You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mention possibility of setting play.http.actionComposition.controllerAnnotationsFirst = [true | false] to controll if controller annotations/constraints should run before or after the method ones.
deadbolt.java.cache-before-auth-check=[true | false (default) ]
Caches the result of deadboltHandler.beforeAuthCheck(...) for the current request (similar to deadbolt.java.cache-user). Also see Allow caching of multiple subjects per request #48 (comment)
Constraint modes deadbolt.java.constraint-mode can be PROCESS_FIRST_CONSTRAINT_ONLY (the default, backward compatible), AND (all constraint annotations of the current action composition chain have to be successful) or OR (only one constraint annotation of the current action composition chain has to be successful) See tests added in Adding tests for all the different modes (OR, AND and the default one) #83 for examples
Constraint annotations are now @Repeatable (actually works with version 2.6.4 and Play 2.6.11 already, however we shouldn't mention it before deadbolt 2.7 comes out so people try to use it with lets say Play 2.6.8). Example see Let's make constraint annotations @Repeatable #70
The deadbolt twirl templates/tags expect an implicit requestheader to be present in the implicit scope now. That however is not a breaking change immediately, because Play's TemplateMagicForJava takes care of this by provding you that implicit requestheader by getting it from the context thread-local. More details see Play migration guide
Finally moved the default configs to the reference.conf file (instead of having it in a ConfigKeys class)
General
F.Promisein the docs. See Update the book (F.Promise to CompletionStage) #27play.http.actionComposition.controllerAnnotationsFirst = [true | false]to controll if controller annotations/constraints should run before or after the method ones.Since version
2.6.3DefaultSubjectclass that can be used. See pull request Add generic DefaultSubject #44Since version
2.6.4deadbolt.java.cache-before-auth-check=[true | false (default) ]Caches the result of
deadboltHandler.beforeAuthCheck(...)for the current request (similar todeadbolt.java.cache-user). Also see Allow caching of multiple subjects per request #48 (comment)deadbolt.java.constraint-modecan bePROCESS_FIRST_CONSTRAINT_ONLY(the default, backward compatible),AND(all constraint annotations of the current action composition chain have to be successful) orOR(only one constraint annotation of the current action composition chain has to be successful) See tests added in Adding tests for all the different modes (OR, AND and the default one) #83 for examples@Pattern: addedmodeattribute (can beANDorOR) +valueattribute takes an array nowExampe see AND/OR mode for @Pattern constraint #88
Since version
2.7.0Http.Contextandctx.argstoHttp.RequestHeaderand it's request attributes (e.g. in the deadbolt handler methods): See Play migration guide and Upgrade to Play 2.7.0-RC3 #95#deadbolt:...becomes+ deadbolt:...andDeadboltRouteCommentFilter*classes were renamed toDeadboltRouteModifierTagsFilter*. For more details please see Use route modifier tags instead of comments in filter #96.DeadboltHandler.beforeAuthCheck(Http.RequestHeader context, Optional<String> content)also getscontentpassed now, see [2.7] Remove deprecated beforeAuthCheck(...) method #77@Repeatable(actually works with version 2.6.4 and Play 2.6.11 already, however we shouldn't mention it before deadbolt 2.7 comes out so people try to use it with lets say Play 2.6.8). Example see Let's make constraint annotations @Repeatable #70@Deferrablewas removed - remove it from the docs, see [2.7] Remove @Deferrable annotation - it's not needed anymore #81alwaysExecuteis nowfalseby default (it should have beenfalsealways anyway like it says in the docs) see [2.7] alwaysExecute behaviour should match the documented one #76ExecutionContextProviderstuff and thedeadbolt.java.custom-execution-contextconfig, see [2.7] Remove unnecessary ExecutionContextProvider #46TemplateMagicForJavatakes care of this by provding you that implicit requestheader by getting it from the context thread-local. More details see Play migration guidereference.conffile (instead of having it in aConfigKeysclass)