Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » Deleting security groups
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: Deleting security groups | 315 Views |
-
Deleting security groups

5 August 2008 at 2:46am
The security section seems to be slightly sketchy when deleting groups.
One problem I have noticed is when you select to delete a group what contains child groups, if you DON'T highlight each child group (select the checkbox so the group becomes a solid colour, rather than a light gray), the group will not be deleted from the database.
I've modified the javascript slightly so when a parent group is selected, ALL children are now automatically highlighted and assigned a delete action.
If anyone else has had this problem, feel free to use the code below as a workaround (its been tested for one branch but no more).
1. Open cms\javascript\SecurityAdmin_left.js
2. Go to the deletegroup object and insert the following lines below the if(sel && sel.className.indexOf('nodelete') == -1) { } block:
// NEW: Added to highlight child groups automatically
var children = sel.getElementsByTagName('li');
for(var i=0; i<children.length; i++)
{
var selIdx = $('sitetree').getIdxOf(children);
deletegroup.selectedNodes[selIdx] = true;
children.addNodeClass('selected');
}This will basically highlight the child groups and assign the delete group method so the groups are deleted properly.
This issue also seems to affect users within the groups (if a group contains users, they are removed from the security section but still exist in the members table?!).
If i determine a quick fix for this I'll post it up.
| 315 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: hotcode, Ryan Marshall, timwjohn
Welcome to our latest member: g6

