Trait

de.ceow.security.play_acl

AclSecurity

Related Doc: package play_acl

Permalink

trait AclSecurity[I <: Identity] extends AnyRef

Play Security object wraps play.api.mvc.Security

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AclSecurity
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def guestRole: Role

    Permalink

    will return a Role which represent the guest role

  2. abstract def guestUser: I

    Permalink

    will return a Identity which represents a guest user

  3. abstract def onUnauthenticated(request: RequestHeader): Result

    Permalink

    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

    request

    the given requets

  4. abstract def onUnauthorized(request: RequestHeader): Result

    Permalink

    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

    request

    the given request

  5. abstract def roles: List[Role]

    Permalink

    will return a list of defined Roles

  6. abstract def userByUsername(username: String)(implicit request: RequestHeader): Option[I]

    Permalink

    will return a Option[Identity]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. def username(request: RequestHeader): Option[String]

    Permalink

    will return the username / email from the session

  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. def withAcl(action: (Acl) ⇒ (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink

    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) }

  22. def withAuth(f: ⇒ (String) ⇒ (Request[AnyContent]) ⇒ Result): EssentialAction

    Permalink

    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) }

  23. def withProtected[O <: AclObject](resource: Resource, privilege: Privilege, objectToCheck: () ⇒ Option[O])(action: (Option[O]) ⇒ (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink

    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") }

  24. def withProtected(resource: Resource, privilege: Privilege)(action: (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink

    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") }

  25. def withProtectedAcl[O <: AclObject](resource: Resource, privilege: Privilege, objectToCheck: () ⇒ Option[O])(f: (Option[O]) ⇒ (Acl) ⇒ (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink

    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) }

  26. def withProtectedAcl(resource: Resource, privilege: Privilege)(action: (Acl) ⇒ (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink

    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) }

  27. def withUser(f: (I) ⇒ (Request[AnyContent]) ⇒ Result): Action[AnyContent]

    Permalink

    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) }

Inherited from AnyRef

Inherited from Any

Ungrouped