Questions tagged [deadbolt]

Deadbolt is a powerful, comprehensive authorization module for the Play framework.

44 questions
1
vote
1 answer

Deadbolt 2 and Play 2.4.x: Null pointer exception on unaccessible pages

I'm trying to implement a simple autentication system in Play Framework 2.4.x using Deadbolt 2. I've followed this guide written by Chaloner and I've implemented my deadbolt handler as you can see here: public class MyDeadboltHandler extends…
Ema.jar
  • 2,370
  • 1
  • 33
  • 43
1
vote
1 answer

Testing if user is allow with a function (not an annotation)

I want to test permissions of a user in my controller, but I need the name of the permission to change at runtime (sometime it is "projectWrite", sometime "userWrite"...), but annotation need a constant, so I can't use it. I need to use a function,…
Moebius
  • 6,242
  • 7
  • 42
  • 54
1
vote
1 answer

Play Framework Migrate from 2.1.x to 2.3.0 with Deadbolt

I have a pretty simple application that I want to upgrade from 2.1.x to 2.3.0 with deadbolt. While Deadbolt hasn't officially came out for 2.3.x, the versions for 2.2.x should be good enough (also, this error occurs on 2.2.x). I have a simple check…
Bert B.
  • 579
  • 2
  • 12
  • 26
1
vote
2 answers

Deadbolt Restrictions Annotation missing - Play 2.1.1, Deadbolt 2.1

I just noticed that the @Restrictions Annotation is missing in Deadbolt 2.2 and also in the deadbolt-2.1 version. In the example and the documentation it is explained (http://deadbolt-2-java.herokuapp.com/#controller-Restrictions). Here it exists…
1
vote
1 answer

Deadbolt 2 in Scala ask if user has access to route

Making a menu in a scala template with some authorized links in them will look like this:
Huub
  • 13
  • 3
0
votes
1 answer

Find Files with the term "deadbolt" in it and return only first subfolder with os.walk

This script gets a term and a path to a folder. Its goal is then to search in every subfolder for files that contain the term "deadbolt" in it and make a list and return that list. So far so good but at the end I want to delete the first subfolder…
0
votes
1 answer

How to get the value of a controller parameter when using dynamic permissions in deadbolt

I am using a dynamic permission in Deadbolt 2 on my controller to check whether a user has access to a resource or not. This resource has an ID and in my controller, I have a method getById(String id) . Looks like that…
Tom
  • 1,357
  • 2
  • 13
  • 32
0
votes
1 answer

Validating Controller classes in java using @Pattern annotation for multiple strings

I am validating a java class using @Pattern annotation from Deadbolt. I want to give access if either of these strings are present : 'TM_TASK' OR 'TM_CHECKLIST'. Right now i am a little confused as to how to provide these strings inside @Pattern so…
0
votes
1 answer

How to define a Deadbolt role in Java?

Deadbolt's documentation is sparse, really. Let's say that I have a standard User. The User object I use has a method - "getThing" I want a role that applies for a "getThing" value of more than 50. How would I go about doing this? Is this possible,…
bharal
  • 15,461
  • 36
  • 117
  • 195
0
votes
1 answer

Play & Deadbolt error

I get the following stack trace (bont not on the loaded page!) whenever I set any of my methods with the @SubjectRequired or @SubjectNotRequired annotations: play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[CompletionException:…
bharal
  • 15,461
  • 36
  • 117
  • 195
0
votes
2 answers

Installing deadbolt dependency in legacy play framework 1.2 application

I am trying to get a legacy play framework application running that depends on deadbolt. The dependency in question is listed as follows in dependencies.yml: - play -> deadbolt 1.5.4 When I run: play dependencies --sync It is not able to locate the…
0
votes
1 answer

Deadbolt play java Change password the first time login

I have 4 group: admin, service, user, guest, admin is created in database, the first time admin login required change password, I want to redirect to form change password and only admin need that, I set redirect in onAuthFailure, but service, user,…
Chung Do
  • 79
  • 9
0
votes
1 answer

Deadbolt 2.5.0, unable to instantiate custom SubjectPresentHandler extending AbstractDeadboltHandler

I am using deadbolt 2.5.0 and I have created custom SubjectPresentHandler as below: public class SubjectPresentHandler extends AbstractDeadboltHandler { public SubjectPresentHandler(ExecutionContextProvider ecProvider) { …
Programmer
  • 325
  • 5
  • 18
0
votes
1 answer

Unable to configure deadbolt-2 in Play 2.2.1 with Spring 4.0.1 DI already implemented

I am using Play 2.2.1 with Spring 4.0.1 for DI. I am using deadbolt-java version 2.2-RC1 for authorization. Whenever I access any request handler annotated with Deadbolt annotation such as this: @SubjectPresent(handler = BaseDeadboltHandler.class)…
Utkarsh S
  • 13
  • 3
0
votes
1 answer

Play java project with Deadbolt, having private Assets

I've been looking around to try and find an example of how to configure a folder of assets, have it being accessed through the @routes.Assets notation but only returning the asset if a user is authenticated. I've got deadbolt configured and working…
SysHex
  • 1,750
  • 2
  • 17
  • 27