commit e83c3b72e72794575cef71b310338d3fb102c980
parent 3839e6a3f60105bece78cce610d3716c7f94de2a
Author: dankert <devnull@localhost>
Date: Sat, 7 Nov 2009 01:32:46 +0100
Funktionen für Benutzer/Gruppen überarbeitet.
Diffstat:
4 files changed, 27 insertions(+), 49 deletions(-)
diff --git a/actionClasses/GroupAction.class.php b/actionClasses/GroupAction.class.php
@@ -50,7 +50,7 @@ class GroupAction extends Action
- function delete()
+ function removeAction()
{
if ( $this->hasRequestVar('confirm') )
{
@@ -66,14 +66,14 @@ class GroupAction extends Action
- function remove()
+ function removeView()
{
$this->setTemplateVars( $this->group->getProperties() );
}
- function save()
+ function editAction()
{
if ( $this->getRequestVar('name') != '' )
{
@@ -91,12 +91,12 @@ class GroupAction extends Action
}
- function add()
+ function addView()
{
}
- function addgroup()
+ function addAction()
{
if ( $this->getRequestVar('name') != '')
{
@@ -182,7 +182,7 @@ class GroupAction extends Action
}
- function edit()
+ function editView()
{
$this->setTemplateVars( $this->group->getProperties() );
}
diff --git a/actionClasses/GroupAction.ini.php b/actionClasses/GroupAction.ini.php
@@ -6,28 +6,19 @@ goto=listing
[add]
menu=listing
-target=addgroup
-
-[addgroup]
-goto=listing
+write=true
[listing]
menu=listing
[remove]
menu=edit
-target=delete
-
-[delete]
-goto=listing
+write=true
[edit]
menu=edit
editable=true
-target=save
-
-[save]
-goto=listing
+write=true
[deluser]
goto=users
diff --git a/actionClasses/UserAction.class.php b/actionClasses/UserAction.class.php
@@ -46,7 +46,7 @@ class UserAction extends Action
}
- function save()
+ function editAction()
{
if ( $this->getRequestVar('name') != '' )
{
@@ -76,14 +76,14 @@ class UserAction extends Action
- function remove()
+ function removeView()
{
$this->setTemplateVars( $this->user->getProperties() );
}
- function delete()
+ function removeAction()
{
if ( $this->hasRequestVar('confirm') )
{
@@ -93,18 +93,18 @@ class UserAction extends Action
else
{
$this->addValidationError('confirm');
- $this->callSubAction('remove');
+ return;
}
}
- function add()
+ function addView()
{
}
- function adduser()
+ function addAction()
{
if ( $this->getRequestVar('name') != '' )
{
@@ -164,7 +164,7 @@ class UserAction extends Action
/**
* Aendern des Kennwortes
*/
- function pwchange()
+ function pwAction()
{
global $conf;
@@ -181,12 +181,12 @@ class UserAction extends Action
if ( strlen($pw1)<intval($conf['security']['password']['min_length']) )
{
$this->addValidationError('password1');
- $this->callSubAction('pw');
+ return;
}
elseif ( $pw1 != $pw2 )
{
$this->addValidationError('password2');
- $this->callSubAction('pw');
+ return;
}
else
{
@@ -224,7 +224,7 @@ class UserAction extends Action
/**
* Eigenschaften des Benutzers anzeigen
*/
- function edit()
+ function editView()
{
$this->setTemplateVars( $this->user->getProperties() );
@@ -234,7 +234,6 @@ class UserAction extends Action
function memberships()
{
-
}
@@ -295,7 +294,7 @@ class UserAction extends Action
/**
* Aendern des Kennwortes
*/
- function pw()
+ function pwView()
{
$this->setTemplateVars( $this->user->getProperties() );
}
@@ -395,7 +394,7 @@ class UserAction extends Action
return !readonly() && count($this->user->getOtherGroups()) > 0;
case 'groups':
- return !readonly() && count($this->user->getGroups()) > 0;
+ return !readonly() && count(Group::getAll()) > 0;
case 'pw':
return !readonly()
diff --git a/actionClasses/UserAction.ini.php b/actionClasses/UserAction.ini.php
@@ -9,50 +9,38 @@ menu=listing
[add]
menu=listing
-target=adduser
-
-[adduser]
-goto=listing
+write=true
[edit]
menu=edit
-target=save
editable=true
-
-[save]
-goto=listing
+write=true
[remove]
menu=edit
-target=delete
-
-[delete]
-goto=listing
+write=true
[memberships]
goto=groups
-; Anzeige der Gruppenzugehörigkeiten
+; Anzeige der Gruppenzugehoerigkeiten
[groups]
menu=memberships
editable=true
target=savegroups
-; Speichern der Gruppenzugehörigkeiten
+; Speichern der Gruppenzugehoerigkeiten
[savegroups]
menu=memberships
goto=groups
[pw]
menu=pw
-target=pwchange
+write=true
[rights]
menu=rights
-[pwchange]
-goto=pw
-
[menu]
listing=listing,add
edit=edit,remove