Packages

t

de.ceow.security.play_acl

AclSecurity

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 Action: ActionBuilder[Request, AnyContent]

    will return an ActionBuilder which is needed by PlayFramework to build actions

    will return an ActionBuilder which is needed by PlayFramework to build actions

    This method is also part of PlayFrameworks BaseController/ AbstractController and InjectedController

  2. abstract def configuration: Configuration

    configuration object of the PlayFramework which contains the configuration of the session key for the username

  3. abstract def guestRole: Role

    will return a Role which represent the guest role

  4. abstract def guestUser: I

    will return a Identity which represents a guest user

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

    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

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

    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

  7. abstract def roles: List[Role]

    will return a list of defined Roles

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

    will return a Option[Identity]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. lazy val sessionUsernameKey: String

    name of the user name key in the session which is configured in the configurations

  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. def username(request: RequestHeader): Option[String]

    will return the username / email from the session

  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def withAcl(action: (Acl) ⇒ (Request[AnyContent]) ⇒ Result): Action[AnyContent]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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