Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:permission_options
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
configuration:permission_options [2017/08/30 14:53] – demiankatz | configuration:permission_options [2023/11/09 19:10] (current) – demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Permission Configuration ====== | ====== Permission Configuration ====== | ||
- | VuFind | + | VuFind® |
- | VuFind | + | VuFind® |
+ | VuFind® 6.1 adds a significant new option to permissionBehavior.ini: | ||
===== Structure of permissionBehavior.ini ===== | ===== Structure of permissionBehavior.ini ===== | ||
Line 11: | Line 12: | ||
deniedTemplateBehavior controls the display of template content associated with the permission. If you want to show the content only to people who have logged in, you could define a permission rule in permissions.ini and reference that in permissionBehavior.ini, | deniedTemplateBehavior controls the display of template content associated with the permission. If you want to show the content only to people who have logged in, you could define a permission rule in permissions.ini and reference that in permissionBehavior.ini, | ||
- | deniedControllerBehavior controls | + | deniedControllerBehavior controls |
As noted above, all possible values for these options are documented in permissionBehavior.ini. | As noted above, all possible values for these options are documented in permissionBehavior.ini. | ||
Line 21: | Line 22: | ||
==== Search Tabs Permissions ==== | ==== Search Tabs Permissions ==== | ||
- | VuFind | + | VuFind® |
Note that [SearchTabsPermissions] ONLY controls the rendering of tabs. It does not prevent users from accessing the searches that those tabs can produce. To restrict actual searching, you will need to pair some controller-specific rules with your search tab permissions. Examples can be found below. | Note that [SearchTabsPermissions] ONLY controls the rendering of tabs. It does not prevent users from accessing the searches that those tabs can produce. To restrict actual searching, you will need to pair some controller-specific rules with your search tab permissions. Examples can be found below. | ||
Line 27: | Line 28: | ||
===== Checking permissions in code ===== | ===== Checking permissions in code ===== | ||
- | Starting with VuFind | + | Starting with VuFind® |
==== Controllers ==== | ==== Controllers ==== | ||
- | Since VuFind | + | Since VuFind® |
- | VuFind | + | VuFind® |
- | VuFind | + | VuFind® |
< | < | ||
Line 48: | Line 49: | ||
==== Templates ==== | ==== Templates ==== | ||
- | It was not possible to check permissions in templates until VuFind | + | It was not possible to check permissions in templates until VuFind® |
< | < | ||
Line 114: | Line 115: | ||
// The button to save a record as a favorite record should be always displayed, but if a user is not logged in, he should be forced to login. // | // The button to save a record as a favorite record should be always displayed, but if a user is not logged in, he should be forced to login. // | ||
- | (This is the default behavior in VuFind | + | (This is the default behavior in VuFind® |
permissions.ini: | permissions.ini: | ||
Line 129: | Line 130: | ||
=== Suppress tab outside of IP range === | === Suppress tab outside of IP range === | ||
- | // You are using the PrimoCentral index and are offering it with a separate search tab. The user should be allowed to see the tab only if he is in a certain IP range. Otherwise the search tab should not get displayed. // | + | // You are using the PrimoCentral index and are offering it with a separate search tab. The user should be allowed to see the tab only if logged |
config.ini: | config.ini: | ||
Line 152: | Line 153: | ||
=== Show note outside of IP range === | === Show note outside of IP range === | ||
- | // You are using the PrimoCentral index and are offering it with a separate search tab. Any user should be allowed to see the tab, but if the tab is clicked, the user should see a note telling him that he needs to be in a certain IP range to use this tab. // | + | // You are using the PrimoCentral index and are offering it with a separate search tab. Any user should be allowed to see the tab, but if the tab is clicked, the user should see a note telling him that he needs to be logged |
config.ini and permissions.ini should be the same as the previous example. | config.ini and permissions.ini should be the same as the previous example. | ||
Line 158: | Line 159: | ||
permissionBehavior.ini: | permissionBehavior.ini: | ||
[access.PrimoModule] | [access.PrimoModule] | ||
- | deniedControllerBehavior = " | + | deniedControllerBehavior = " |
=== Throw exception outside of IP range === | === Throw exception outside of IP range === | ||
- | // You are using the PrimoCentral index and are offering it with a separate search tab. Any user should be allowed to see the tab, but if the tab is clicked, the system should throw an exception. // | + | // You are using the PrimoCentral index and are offering it with a separate search tab. Any user should be allowed to see the tab, but if the tab is clicked, the system should throw an exception |
config.ini and permissions.ini should be the same as the previous example. | config.ini and permissions.ini should be the same as the previous example. | ||
Line 168: | Line 169: | ||
permissionBehavior.ini: | permissionBehavior.ini: | ||
[access.PrimoModule] | [access.PrimoModule] | ||
- | deniedControllerBehavior = " | + | deniedControllerBehavior = " |
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
configuration/permission_options.1504104791.txt.gz · Last modified: 2017/08/30 14:53 by demiankatz