silverstripe-restrictedobjects | SilverStripe module to lock down object access
kandi X-RAY | silverstripe-restrictedobjects Summary
kandi X-RAY | silverstripe-restrictedobjects Summary
silverstripe-restrictedobjects is a PHP library. silverstripe-restrictedobjects has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.
A SilverStripe module to lock down object access, for the CMS as well as non-page objects
A SilverStripe module to lock down object access, for the CMS as well as non-page objects
Support
Quality
Security
License
Reuse
Support
silverstripe-restrictedobjects has a low active ecosystem.
It has 18 star(s) with 10 fork(s). There are 1 watchers for this library.
It had no major release in the last 12 months.
There are 4 open issues and 6 have been closed. On average issues are closed in 22 days. There are 3 open pull requests and 0 closed requests.
It has a neutral sentiment in the developer community.
The latest version of silverstripe-restrictedobjects is 3.0.2
Quality
silverstripe-restrictedobjects has 0 bugs and 0 code smells.
Security
silverstripe-restrictedobjects has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
silverstripe-restrictedobjects code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
silverstripe-restrictedobjects is licensed under the BSD-3-Clause License. This license is Permissive.
Permissive licenses have the least restrictions, and you can use them in most projects.
Reuse
silverstripe-restrictedobjects releases are available to install and integrate.
Installation instructions, examples and code snippets are available.
silverstripe-restrictedobjects saves you 860 person hours of effort in developing the same functionality from scratch.
It has 1969 lines of code, 117 functions and 31 files.
It has medium code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA
kandi has reviewed silverstripe-restrictedobjects and discovered the below as its top functions. This is intended to give you an instant insight into silverstripe-restrictedobjects implemented functionality, and help decide if they suit your requirements.
- Load a list of objects .
- Called before the write
- Restrict the list
- Returns the effective parents for a node
- Do a change
- Require default role
- Runs a security context
- Returns an array representation of the DataList .
- Log a user out
- Define permissions .
Get all kandi verified functions for this library.
silverstripe-restrictedobjects Key Features
No Key Features are available at this moment for silverstripe-restrictedobjects.
silverstripe-restrictedobjects Examples and Code Snippets
No Code Snippets are available at this moment for silverstripe-restrictedobjects.
Community Discussions
No Community Discussions are available at this moment for silverstripe-restrictedobjects.Refer to stack overflow page for discussions.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install silverstripe-restrictedobjects
Place this directory in the root of your SilverStripe installation. Ensure that the folder name is restrictedobjects.
Run dev/build with the ?disable_perms=1 parameter - in dev mode, permissions can be disabled by using this flag, which is needed to ensure things are installed correctly
Assign the extensions
Run dev/build again, login to your system as an admin
On your "Site" object, make sure the "Allow public access" checkbox is enabled so that the site is still viewable.
Create the following DB index; SS doesn't give a nice way to do this and static $indexes doesn't seem to work anyway... ALTER TABLE AccessAuthority ADD INDEX ( ItemID , ItemType ) ;
To manage permissions using the restricted objects module, there are a few steps commonly performed. Some default access roles are automatically created when you install the system. These can be accessed via the Access Roles section. To define new roles, you simply create a new AccessRole item, and select the permissions you want to use within it. Assigning roles are done from the "Permissions" tab of any content item. You can specify the role to assign for a user or a group, and whether you are granting or denying that role. You can also choose individual permissions to apply or revoke. To define a new low-level permission item, you must define a class that implements PermissionDefiner (not to be confused with the default SilverStripe interface PermissionProvider) and return a simple array of strings in the definePermissions() method. These strings should be the permissions you check for in $obj->checkPerm('CustomPerm');. See the (wiki)[https://github.com/nyeholt/silverstripe-restrictedobjects/wiki] for more.
Navigate to the node (SiteConfig, Page, or custom data object type) that you want permissions applied on.
On the Permissions tab, click "Add Access Authority"
Select the role to give the user. This will give them the permissions defined for this role in the Access Roles section of the CMS
Select which members or groups to grant this role for
Select whether to GRANT or DENY this permission
Click "Save"
Once the permission table refreshes, you will see all the permissions granted for that "Authority".
Run dev/build with the ?disable_perms=1 parameter - in dev mode, permissions can be disabled by using this flag, which is needed to ensure things are installed correctly
Assign the extensions
Run dev/build again, login to your system as an admin
On your "Site" object, make sure the "Allow public access" checkbox is enabled so that the site is still viewable.
Create the following DB index; SS doesn't give a nice way to do this and static $indexes doesn't seem to work anyway... ALTER TABLE AccessAuthority ADD INDEX ( ItemID , ItemType ) ;
To manage permissions using the restricted objects module, there are a few steps commonly performed. Some default access roles are automatically created when you install the system. These can be accessed via the Access Roles section. To define new roles, you simply create a new AccessRole item, and select the permissions you want to use within it. Assigning roles are done from the "Permissions" tab of any content item. You can specify the role to assign for a user or a group, and whether you are granting or denying that role. You can also choose individual permissions to apply or revoke. To define a new low-level permission item, you must define a class that implements PermissionDefiner (not to be confused with the default SilverStripe interface PermissionProvider) and return a simple array of strings in the definePermissions() method. These strings should be the permissions you check for in $obj->checkPerm('CustomPerm');. See the (wiki)[https://github.com/nyeholt/silverstripe-restrictedobjects/wiki] for more.
Navigate to the node (SiteConfig, Page, or custom data object type) that you want permissions applied on.
On the Permissions tab, click "Add Access Authority"
Select the role to give the user. This will give them the permissions defined for this role in the Access Roles section of the CMS
Select which members or groups to grant this role for
Select whether to GRANT or DENY this permission
Click "Save"
Once the permission table refreshes, you will see all the permissions granted for that "Authority".
Support
Marcus Nyeholt marcus@silverstripe.com.au
Find more information at:
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page