Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthzFilter ¶
func AuthzFilter(c *revel.Controller, fc []revel.Filter)
AuthzFilter enables the authorization based on Casbin.
Usage:
- Add `authz.AuthzFilter` to the app's filters (it must come after the authentication).
- Init the Casbin enforcer.
func CheckPermission ¶
CheckPermission checks the user/method/path combination from the request. Returns true (permission granted) or false (permission forbidden)
func GetUserName ¶
GetUserName gets the user name from the request. Currently, only HTTP basic authentication is supported
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.