mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
dump roles
This commit is contained in:
parent
86b1a562c1
commit
6ba36e2cae
|
@ -100,6 +100,7 @@ if(isset($options['skip-root'])) {
|
|||
$statistic = array(
|
||||
'documents'=>0,
|
||||
'folders'=>0,
|
||||
'roles'=>0,
|
||||
'users'=>0,
|
||||
'groups'=>0,
|
||||
'attributedefinitions'=>0,
|
||||
|
@ -477,6 +478,24 @@ $dms->setRootFolderID($settings->_rootFolderID);
|
|||
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
|
||||
echo "<dms dbversion=\"".implode('.', array_slice($dms->getDBVersion(), 1, 3))."\" date=\"".date('Y-m-d H:i:s')."\">\n";
|
||||
|
||||
/* Dump roles {{{ */
|
||||
if(!$sections || in_array('roles', $sections)) {
|
||||
$roles = $dms->getAllRoles();
|
||||
if($roles) {
|
||||
echo "<roles>\n";
|
||||
foreach ($roles as $role) {
|
||||
echo " <role id=\"".$role->getId()."\">\n";
|
||||
echo " <attr name=\"name\">".wrapWithCData($role->getName())."</attr>\n";
|
||||
echo " <attr name=\"role\">".$role->getRole()."</attr>\n";
|
||||
echo " <attr name=\"noaccess\">".implode(',', $role->getNoAccess())."</attr>\n";
|
||||
echo " </role>\n";
|
||||
$statistic['roles']++;
|
||||
}
|
||||
echo "</roles>\n";
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Dump users {{{ */
|
||||
if(!$sections || in_array('users', $sections)) {
|
||||
$users = $dms->getAllUsers();
|
||||
|
@ -491,7 +510,7 @@ if($users) {
|
|||
echo " <attr name=\"comment\">".wrapWithCData($user->getComment())."</attr>\n";
|
||||
echo " <attr name=\"language\">".$user->getLanguage()."</attr>\n";
|
||||
echo " <attr name=\"theme\">".$user->getTheme()."</attr>\n";
|
||||
echo " <attr name=\"role\">".$user->getRole()."</attr>\n";
|
||||
echo " <attr name=\"role\">".$user->getRole()->getID()."</attr>\n";
|
||||
echo " <attr name=\"hidden\">".$user->isHidden()."</attr>\n";
|
||||
echo " <attr name=\"disabled\">".$user->isDisabled()."</attr>\n";
|
||||
echo " <attr name=\"pwdexpiration\">".$user->getPwdExpiration()."</attr>\n";
|
||||
|
@ -682,6 +701,7 @@ if($workflows) {
|
|||
echo " <workflow id=\"".$workflow->getID()."\">\n";
|
||||
echo " <attr name=\"name\">".$workflow->getName()."</attr>\n";
|
||||
echo " <attr name=\"initstate\">".$workflow->getInitState()->getID()."</attr>\n";
|
||||
echo " <attr name=\"layoutdata\">".wrapWithCData($workflow->getLayoutData())."</attr>\n";
|
||||
if($transitions = $workflow->getTransitions()) {
|
||||
echo " <transitions>\n";
|
||||
foreach($transitions as $transition) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user