commit 0213ea28e168cceb4bdd6ce31fee2c4989dd7dc0
parent 7ad730912a58650c2feee5697d5c6be2a92b1110
Author: Jan Dankert <develop@jandankert.de>
Date: Wed, 24 Apr 2019 22:59:18 +0200
Fix: Benutzer-Berechtigungen wieder anzeigen.
Diffstat:
3 files changed, 87 insertions(+), 97 deletions(-)
diff --git a/modules/cms-core/action/UserAction.class.php b/modules/cms-core/action/UserAction.class.php
@@ -44,9 +44,11 @@ use \Mail;
class UserAction extends Action
{
public $security = SECURITY_ADMIN;
-
- var $user;
- var $defaultSubAction = 'edit';
+
+ /**
+ * @var User
+ */
+ private $user;
/**
diff --git a/modules/cms-ui/themes/default/html/views/user/rights.php b/modules/cms-ui/themes/default/html/views/user/rights.php
@@ -1,84 +1,81 @@
- <div class="table-wrapper"><div class="table-filter"><input type="search" name="filter" placeholder="<?php echo lang('SEARCH_FILTER') ?>" /></div><table width="100%"></div>
- <?php foreach($projects as $list_key=>$list_value){ ?><?php extract($list_value) ?>
- <tr>
- <td colspan="2">
- <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo $projectname ?></legend><div>
- <?php $if7=(($acls)==FALSE); if($if7){?>
- <div>
- <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span>
+ <?php foreach($projects as $list_key=>$list_value){ ?><?php extract($list_value) ?>
+ <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo $projectname ?></legend><div>
+ <?php $if4=(($rights)==FALSE); if($if4){?>
+ <div>
+ <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span>
+
+ </div>
+ <?php } ?>
+ <?php $if4=!(($rights)==FALSE); if($if4){?>
+ <div class="table-wrapper"><div class="table-filter"><input type="search" name="filter" placeholder="<?php echo lang('SEARCH_FILTER') ?>" /></div><table width="100%"></div>
+ <tr class="headline">
+ <td class="help">
+ <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_USER')))); ?></span>
+
+ </td>
+ <td class="help">
+ <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NAME')))); ?></span>
+
+ </td>
+ <td class="help">
+ <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_LANGUAGE')))); ?></span>
+
+ </td>
+ <?php foreach($show as $list_key=>$t){ ?>
+ <td class="help">
+ <span title="<?php echo lang('acl_'.$t.'') ?>"><?php echo nl2br(encodeHtml(htmlentities(lang('acl_'.$t.'_abbrev')))); ?></span>
- </div>
+ </td>
<?php } ?>
- <?php $if7=!(($acls)==FALSE); if($if7){?>
- <div class="table-wrapper"><div class="table-filter"><input type="search" name="filter" placeholder="<?php echo lang('SEARCH_FILTER') ?>" /></div><table width="100%"></div>
- <tr class="headline">
- <td class="help">
- <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_USER')))); ?></span>
-
- </td>
- <td class="help">
- <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NAME')))); ?></span>
+ </tr>
+ <?php foreach($rights as $aclid=>$acl){ ?><?php extract($acl) ?>
+ <tr class="data">
+ <td>
+ <?php $if9=(isset($username)); if($if9){?>
+ <img src="./modules/cms-ui/themes/default/images/icon_user.png" />
+
+ <span><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $username,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
+
+ <?php } ?>
+ <?php $if9=(isset($groupname)); if($if9){?>
+ <img src="./modules/cms-ui/themes/default/images/icon_group.png" />
+
+ <span><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $groupname,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
+
+ <?php } ?>
+ <?php $if9=!(isset($username)); if($if9){?>
+ <?php $if10=!(isset($groupname)); if($if10){?>
+ <img src="./modules/cms-ui/themes/default/images/icon_group.png" />
- </td>
- <td class="help">
- <span><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_LANGUAGE')))); ?></span>
+ <span><?php echo nl2br(encodeHtml(htmlentities(lang(''.'global_all'.'')))); ?></span>
- </td>
- <?php foreach($show as $list_key=>$t){ ?>
- <td class="help">
- <span title="<?php echo lang('acl_'.$t.'') ?>"><?php echo nl2br(encodeHtml(htmlentities(lang('acl_'.$t.'_abbrev')))); ?></span>
-
- </td>
<?php } ?>
- </tr>
- <?php foreach($rights as $aclid=>$acl){ ?><?php extract($acl) ?>
- <tr class="data">
- <td>
- <?php $if12=(isset($username)); if($if12){?>
- <img src="./modules/cms-ui/themes/default/images/icon_user.png" />
-
- <span><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $username,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
-
- <?php } ?>
- <?php $if12=(isset($groupname)); if($if12){?>
- <img src="./modules/cms-ui/themes/default/images/icon_group.png" />
-
- <span><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $groupname,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
-
- <?php } ?>
- <?php $if12=!(isset($username)); if($if12){?>
- <?php $if13=!(isset($groupname)); if($if13){?>
- <img src="./modules/cms-ui/themes/default/images/icon_group.png" />
-
- <span><?php echo nl2br(encodeHtml(htmlentities(lang(''.'global_all'.'')))); ?></span>
-
- <?php } ?>
- <?php } ?>
- <?php unset($username) ?>
-
- <?php unset($groupname) ?>
-
- </td>
- <td>
- <img src="./modules/cms-ui/themes/default/images/icon_<?php echo $objecttype ?>.png" />
-
- <a target="_self" data-action="<?php echo $objecttype ?>" data-method="" data-id="<?php echo $objectid ?>" data-extra="[]" href="<?php echo Html::url($objecttype,'',$objectid,array()) ?>">
- <span title="<?php echo lang('select') ?>"><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $objectname,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
-
- </a>
+ <?php } ?>
+ <?php unset($username) ?>
+
+ <?php unset($groupname) ?>
+
+ </td>
+ <td>
+ <img src="./modules/cms-ui/themes/default/images/icon_<?php echo $objecttype ?>.png" />
+
+ <a target="_self" data-type="open" data-action="<?php echo $objecttype ?>" data-method="rights" data-id="<?php echo $objectid ?>" data-extra="[]" href="<?php echo Html::url($objecttype,'',$objectid,array()) ?>">
+ <span title="<?php echo lang('select') ?>"><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $objectname,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
+
+ </a>
- </td>
- <td>
- <span><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $languagename,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
-
- </td>
- <?php foreach($show as $list_key=>$list_value){ ?>
- <td>
- <?php $$list_value= $bits[$list_value]; ?>
-
- <?php { $tmpname = $list_value;$default = '';$readonly = '1';$required = '';
+ </td>
+ <td>
+ <span><?php echo nl2br(encodeHtml(htmlentities(Text::maxLength( $languagename,20,'..',constant('STR_PAD_BOTH') )))); ?></span>
+
+ </td>
+ <?php foreach($show as $list_key=>$list_value){ ?>
+ <td>
+ <?php $$list_value= $bits[$list_value]; ?>
+
+ <?php { $tmpname = $list_value;$default = '';$readonly = '1';$required = '';
if ( isset($$tmpname) )
$checked = $$tmpname;
else
@@ -91,16 +88,13 @@
?><input type="hidden" name="<?php echo $tmpname ?>" value="1" /><?php
}
} ?>
-
- </td>
- <?php } ?>
- </tr>
- <?php } ?>
- </table>
- <?php } ?>
- </div></fieldset>
- </td>
- </tr>
- <?php } ?>
- </table>
+
+ </td>
+ <?php } ?>
+ </tr>
+ <?php } ?>
+ </table>
+ <?php } ?>
+ </div></fieldset>
+ <?php } ?>
\ No newline at end of file
diff --git a/modules/cms-ui/themes/default/html/views/user/rights.tpl.src.xml b/modules/cms-ui/themes/default/html/views/user/rights.tpl.src.xml
@@ -1,17 +1,14 @@
<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd">
- <table>
<list list="projects" extract="true">
- <row>
- <column colspan="2">
<group title="var:projectname">
- <if empty="acls">
+ <if empty="rights">
<part>
<text text="GLOBAL_NOT_FOUND"></text>
</part>
</if>
- <if not="true" empty="acls">
+ <if not="true" empty="rights">
<table>
<row class="headline">
<column class="help">
@@ -51,7 +48,7 @@
</column>
<column>
<image type="var:objecttype"></image>
- <link action="var:objecttype" subaction="" id="var:objectid">
+ <link type="open" action="var:objecttype" id="var:objectid">
<text var="objectname" maxlength="20" title="message:select"></text>
</link>
</column>
@@ -69,8 +66,5 @@
</table>
</if>
</group>
- </column>
- </row>
</list>
- </table>
</output>
\ No newline at end of file