will return a Role which represent the guest role
will return a Identity which represents a guest user
method, what happens when a user is not authenticated or the ACL declines the user to access
method, what happens when a user is not authenticated or the ACL declines the user to access
the given requets
method, which is called, when a user are not allowed to see this page
method, which is called, when a user are not allowed to see this page
the given request
will return a list of defined Roles
will return a Option[Identity]
will return the username / email from the session
this method will return the logged in user or a guest user instance and applies an instance of Acl to the action.
this method will return the logged in user or a guest user instance and applies an instance of Acl to the action.
def myAction = withAcl { Acl: Acl[I] ⇒ implicit request // Ok(Acl.observerIdentity.roles.toString) }
this method will check if a user is authenticated and applies it's username/email to the action.
this method will check if a user is authenticated and applies it's username/email to the action. If the user is not authenticated the result of "onUnauthenticated" is returned
def myAction = withAuth { username ⇒ implicit request // Ok(username) }
This method will check if the user is allowed for given resource and privilege on specific object If the Acl check will fail the result of "onUnauthorized" is returned
This method will check if the user is allowed for given resource and privilege on specific object If the Acl check will fail the result of "onUnauthorized" is returned
def myAction = withProtected(myResource, myPrivilege) {implicit request // Ok("done") }
This method will check if the user is allowed for given resource and privilege on specific object If the Acl check will fail the result of "onUnauthorized" is returned
This method will check if the user is allowed for given resource and privilege on specific object If the Acl check will fail the result of "onUnauthorized" is returned
def myAction = withProtected(myResource, myPrivilege) {implicit request // Ok("done") }
This method will check if the user is allowed for given resource and privilege If the Acl check will fail the result of "onUnauthorized" is returned
This method will check if the user is allowed for given resource and privilege If the Acl check will fail the result of "onUnauthorized" is returned
def myAction = withProtected(myResource, myPrivilege) {implicit request // Ok("done") }
this method will check if the user is allowed for resource and privilege on specific object and applies an instance of Acl to the action.
this method will check if the user is allowed for resource and privilege on specific object and applies an instance of Acl to the action. If the Acl check will fail the result of "onUnauthorized" is returned
def myAction = withProtectedAcl(myResource, myPrivilege, acl: Acl => MyObject) { Acl: Acl[I] ⇒ implicit request // Ok(Acl.observerIdentity.roles.toString) }
this method will check if the user is allowed for resource and privilege on specific object and applies an instance of Acl to the action.
this method will check if the user is allowed for resource and privilege on specific object and applies an instance of Acl to the action. If the Acl check will fail the result of "onUnauthorized" is returned
def myAction = withProtectedAcl(myResource, myPrivilege, () => MyObject) { Acl: Acl[I] ⇒ implicit request // Ok(Acl.observerIdentity.roles.toString) }
this method will check if the user is allowed for given resource and privilege and applies an instance of Acl to the action.
this method will check if the user is allowed for given resource and privilege and applies an instance of Acl to the action. If the Acl check will fail the result of "onUnauthorized" is returned
def myAction = withProtectedAcl(myResource, myPrivilege) { Acl: Acl[I] ⇒ implicit request // Ok(Acl.observerIdentity.roles.toString) }
this method will check if the user is authenticated and applies the instance of Identity to the action.
this method will check if the user is authenticated and applies the instance of Identity to the action. If the user is not authenticated the guest user will be returned
def myAction = withUser { user: I ⇒ implicit request // Ok(user.roles.toString) }
Play Security object wraps play.api.mvc.Security