=====Massacls Action===== >>==See also:== Parent Action: PageAdminAction Documentation: MassaclsActionInfo.>> This is the development page for the Massacls action.::c:: The Masaacls Action is a part of the PageAdminAction. ====User view==== After sending the data from the PageAdminAction, a form was created to input the needed acl data. If a field left empty, the value did'nt change ""
Read ACL:
Write ACL:
Comments ACL:

"" ====The Protocoll==== ""

write ACL updated for HeinrichHeine

write ACL updated for KurtTocholsky

Seiten - Administration

"" ====The Code==== After sending this form to Massacls the changes where made and a small protocol is shown: **The sourcecode is the first draft and in an alpha-status. ** **It works, not more, documentation and some changes for translation etc. will following.** %%(php;1) FormOpen() ?>
Read ACL:
Write ACL:
Comments ACL:


Syntax:


* = Everyone
+ = Registered users
Or enter individual user WikiNames, one per line
--------------------------------------
Note: Any of these items can be negated with a !
!* = No one
!+ = Anonymous users
!JohnDoe = JohnDoe will be denied access.

Be aware that the ACLs are tested in the order specified.
So be sure to specify * on a separate line
after negating any users--not before.
Otherwise, the * everyone condition will always give access
before the list of users that should not have access is tested.
FormClose()); } else if (isset($_POST['action']) && $this->IsAdmin($this->GetUser())) // we have to do the acl change action { function mySaveACL($page, $tag, $acl, $acls) { $posted = $_POST[$acl.'_acl']; //$default = $page->GetConfigValue('default_'.$acl.'_acl'); if (trim($posted != '')) if ($posted != $acls[$acl.'_acl']) { //if ($posted == $default) // $posted = ''; $page->SaveACL($tag, $acl, $page->TrimACLs($posted)); print ('

'.$acl.' ACL updated for '.$tag.'

'); } } foreach (explode('|',$_POST['ids']) as $id) if ($id != '') { $page = $this->LoadPageById($id); $tag = $page['tag']; $acls = $this->LoadAllACLs($tag,0); mySaveACL($this, $tag, 'read', $acls); mySaveACL($this, $tag, 'write', $acls); mySaveACL($this, $tag, 'comment', $acls); } } else print ('

What are you doing here?

'); print ('

Seiten - Administration

'); ?> %% Feel free to make it secure and better! ---- CategoryDevelopmentActions