; This file controls how denied permissions are treated within VuFind. ; ; The permissions need to be set in permissions.ini. ; In this file you can configure what should happen if a permission is denied. ; Please use the permission names from permissions.ini as section names here. ; ; Example: ; ; This role from permissions.ini: ; ; [default.EITModule] ; role = loggedin ; permission = access.EITModule ; ; should be configured here in section: ; ; [access.EITModule] ; ; See permissions.ini for more permissions that you may also wish to configure here. ; ; Within each section, there are two options which can be configured: ; ; deniedTemplateBehavior: The behavior to apply when a permission is denied ; dynamically within a template; i.e. the user has access to a page but is blocked ; from a particular feature of that page. If undefined, the default behavior is ; to hide the affected functionality and display no special message. ; ; deniedControllerBehavior: The behavior to apply when a permission is denied at the ; controller level; i.e. the user is totally blocked from accessing something. If ; undefined, the default behavior defined by the controller (usually promptLogin) ; will be applied. ; ; Each of these options may be set to one of the following options; most options ; also receive a colon-delimited list of parameters. ; ; exception - Throw the specified exception class (param 1) with the specified ; exception message (param 2). ; This option is ONLY supported by deniedControllerBehavior. ; example: deniedControllerBehavior = exception:MyExceptionClass:Access Denied. ; ; promptLogin - Redirect the user to the login page. You can optionally set the ; first parameter to a message to display on the login page (omit for default). ; This option is ONLY supported by deniedControllerBehavior. ; example: deniedControllerBehavior = promptLogin ; ; showMessage - Display the message (the first parameter) to the user; this text ; will be run through the translator. When used as the deniedControllerBehavior, ; the message will be displayed in the form of a flash message on the ; "permission denied" screen. When used as the deniedTemplateBehavior, the text ; will be displayed in place of the blocked markup. ; example: deniedControllerBehavior = showMessage:Blocked! ; ; showTemplate - Render a specific template, specified as the first parameter. ; This option is ONLY supported by deniedTemplateBehavior. ; example: deniedTemplateBehavior = showTemplate:error/denied ; Section for global parameters [global] ; The default behavior will get used if a permission is denied, but the controller ; in question defines no default behavior and no permission denied behavior has been ; configured in this file for the relevant permission. defaultDeniedControllerBehavior = "promptLogin" ; The default behavior will get used if a permission is denied, but no permission ; denied behavior has been configured in this file for the relevant permission. ; (False means "use the default behavior defined by the template"). defaultDeniedTemplateBehavior = false ; This setting can be used to override access permissions for controllers. You can ; set a controller class name inside the brackets to explicitly override that ; controller's access permission (and that of any of its children, unless more ; specific permissions are set for those subclasses), whether or not it has a ; default defined in the class. You can use * inside the brackets to set a default ; access permission that is applied to all controllers that do not have an ; internally-defined default (the MyResearchController is also excluded from ; this setting to avoid infinite login redirects). This can be useful if you ; wish to password-protect your entire site. ;controllerAccess[*] = access.VuFindInterface ;controllerAccess[VuFind\Controller\SearchController] = access.SearchResults ; Configuration for EIT (needed to make it behave correctly in combined ; searches): [access.EITModule] deniedTemplateBehavior = showTemplate:error/loginForAccess ; Example configuration for non-standard favorites permission behavior: ;[feature.Favorites] ;deniedTemplateBehavior = "showMessage:Login for Favorites" ; Note that VuFind loads the MyResearch/Favorites action by default, so be ; careful about blocking this at the controller level. If you conditionally ; block this for some users, you should change the defaultAccountPage in ; config.ini to avoid causing login problems. ;deniedControllerBehavior = "exception::You are not logged in!"