commit 57f90b35a29e1bb9eddfaf24872cabfd46aa8e4f
parent b44af0c7cbe5b0021199e954174a7d012521783c
Author: dankert <devnull@localhost>
Date: Wed, 28 Apr 2004 22:22:32 +0200
Rechte hinzufügen
Diffstat:
1 file changed, 34 insertions(+), 13 deletions(-)
diff --git a/actionClasses/FileAction.class.php b/actionClasses/FileAction.class.php
@@ -20,7 +20,10 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ---------------------------------------------------------------------------
// $Log$
-// Revision 1.3 2004-04-24 17:02:47 dankert
+// Revision 1.4 2004-04-28 20:22:32 dankert
+// Rechte hinzufügen
+//
+// Revision 1.3 2004/04/24 17:02:47 dankert
// Korrektur: Link auf Seite
//
// Revision 1.2 2004/04/24 16:55:27 dankert
@@ -55,9 +58,9 @@ class FileAction extends Action
}
- function addAccessACL()
+ function addACL()
{
- $this->objectAddAccessACL();
+ $this->objectAddACL();
$this->callSubAction('rights');
}
@@ -262,22 +265,40 @@ class FileAction extends Action
function rights()
{
- $acl = new Acl();
- $acl->objectid = $this->file->objectid;
+ global $SESS;
+ global $conf_php;
+ if ($SESS['user']['is_admin'] != '1') die('nice try');
+
+ $acllist = array();
+ foreach( $this->file->getAllInheritedAclIds() as $aclid )
+ {
+ $acl = new Acl( $aclid );
+ $acl->load();
+ $key = 'au'.$acl->username.'g'.$acl->groupname.'a'.$aclid;
+ $acllist[$key] = $acl->getProperties();
+ }
- $var['access_acls'] = array();
+// $this->setTemplateVar('inherited_acls',$acllist );
+// $acllist = array();
- foreach( $acl->getAccessACLsFromObject() as $id )
+ foreach( $this->file->getAllAclIds() as $aclid )
{
- $acl = new Acl( $id );
+ $acl = new Acl( $aclid );
$acl->load();
- $var['access_acls'][$id] = $acl->getProperties();
- $var['access_acls'][$id]['delete_url'] = 'folder.'.$conf_php.'?folderaction=delACL&aclid='.$id;
+ $key = 'bu'.$acl->username.'g'.$acl->groupname.'a'.$aclid;
+ $acllist[$key] = $acl->getProperties();
+ $acllist[$key]['delete_url'] = Html::url(array('subaction'=>'delACL','aclid'=>$aclid));
}
+ ksort( $acllist );
+
+ $this->setTemplateVar('acls',$acllist );
+
+ $this->setTemplateVar('users' ,User::listAll() );
+ $this->setTemplateVar('groups' ,Group::getAll() );
- $var['users'] = User::listAll();
- $var['groups'] = Group::getAll();
- $var['languages'] = Language::getAll();
+ $languages = Language::getAll();
+ $languages[0] = lang('ALL_LANGUAGES');
+ $this->setTemplateVar('languages',$languages);
$this->forward('file_rights');
}