|
|
|
<label>[[admin/manage/privileges:group-privileges]]</label>
|
|
|
|
<table class="table table-striped privilege-table">
|
|
|
|
<thead>
|
|
|
|
{{{ if !isAdminPriv }}}
|
|
|
|
<tr class="privilege-table-header">
|
|
|
|
<th colspan="3"></th>
|
|
|
|
<th class="arrowed" colspan="6">
|
|
|
|
[[admin/manage/categories:privileges.section-posting]]
|
|
|
|
</th>
|
|
|
|
<th class="arrowed" colspan="7">
|
|
|
|
[[admin/manage/categories:privileges.section-viewing]]
|
|
|
|
</th>
|
|
|
|
<th class="arrowed" colspan="2">
|
|
|
|
[[admin/manage/categories:privileges.section-moderation]]
|
|
|
|
</th>
|
|
|
|
</tr><tr><!-- zebrastripe reset --></tr>
|
|
|
|
{{{ end }}}
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">[[admin/manage/categories:privileges.section-group]]</th>
|
|
|
|
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
|
|
|
|
<!-- BEGIN privileges.labels.groups -->
|
|
|
|
<th class="text-center">{privileges.labels.groups.name}</th>
|
|
|
|
<!-- END privileges.labels.groups -->
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<!-- BEGIN privileges.groups -->
|
|
|
|
<tr data-group-name="{privileges.groups.nameEscaped}" data-private="<!-- IF privileges.groups.isPrivate -->1<!-- ELSE -->0<!-- ENDIF privileges.groups.isPrivate -->">
|
|
|
|
<td>
|
|
|
|
{{{ if privileges.groups.isPrivate }}}
|
|
|
|
{{{ if (privileges.groups.name == "banned-users") }}}
|
|
|
|
<i class="fa fa-fw fa-exclamation-triangle text-muted" title="[[admin/manage/categories:privileges.inheritance-exception]]"></i>
|
|
|
|
{{{ else }}}
|
|
|
|
<i class="fa fa-fw fa-lock text-muted" title="[[admin/manage/categories:privileges.group-private]]"></i>
|
|
|
|
{{{ end }}}
|
|
|
|
{{{ else }}}
|
|
|
|
<i class="fa fa-fw fa-none"></i>
|
|
|
|
{{{ end }}}
|
|
|
|
{privileges.groups.name}
|
|
|
|
</td>
|
|
|
|
<td></td>
|
|
|
|
<td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>
|
|
|
|
{function.spawnPrivilegeStates, privileges.groups.name, ../privileges}
|
|
|
|
</tr>
|
|
|
|
<!-- END privileges.groups -->
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<td colspan="3"></td>
|
|
|
|
<td colspan="{privileges.keys.groups.length}">
|
|
|
|
<div class="btn-toolbar">
|
feat: more discrete commit-on-save instead of commit-on-change w/ confirm modals (#8541)
* feat: privileges save button, #8537, WIP
* fix: disable firefox autocomplete on privilege form fields
* feat: closes #8537 privilege changes commit on save
- new language strings for confirmation and success modals/toasts
- indeterminate privilege handling (/cc @psychobunny)
- added new discard button
- both discard and save buttons now have confirmation dialogs
* fix(tests): remove duplicate template helper test
* fix(tests): broken template helper test
* feat: confirm dialogs for all privilege copy actions
Also, ability to add user to a privilege table without needing
to refresh the privilege table.
* feat: group row addition w/o table refresh
breaking: helpers.getUserPrivileges and helpers.getGroupPrivileges
no longer make socket calls to the following hooks:
- filter:privileges.list, filter:privileges.admin.list,
filter:privileges.global.list, filter:privileges.groups.list,
filter:privileges.admin.groups.list,
filter:privileges.gloval.groups.list
The filters are still called, but done before the helper method
is called, and the results are passed in instead. This change
should only affect you if you directly call the helper methods,
otherwise the change is transparent.
* fix: stale ajaxify data on privilege category switch
* fix: implicit privileges not showing for user privs
* fix: groups, not group, also fix tests
* fix(tests): again
* fix: wrong tpl rendered when adding group to global priv table
5 years ago
|
|
|
<button type="button" class="btn btn-default pull-right" data-ajaxify="false" data-action="search.group">
|
|
|
|
<i class="fa fa-users"></i>
|
|
|
|
[[admin/manage/categories:privileges.search-group]]
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
<div class="help-block">
|
|
|
|
[[admin/manage/categories:privileges.inherit]]
|
|
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<label>[[admin/manage/privileges:user-privileges]]</label>
|
|
|
|
<table class="table table-striped privilege-table">
|
|
|
|
<thead>
|
|
|
|
<tr class="privilege-table-header">
|
|
|
|
<th colspan="15"></th>
|
|
|
|
</tr><tr><!-- zebrastripe reset --></tr>
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">[[admin/manage/categories:privileges.section-user]]</th>
|
|
|
|
<th class="text-center">[[admin/manage/privileges:select-clear-all]]</th>
|
|
|
|
<!-- BEGIN privileges.labels.users -->
|
|
|
|
<th class="text-center">{privileges.labels.users.name}</th>
|
|
|
|
<!-- END privileges.labels.users -->
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<!-- BEGIN privileges.users -->
|
|
|
|
<tr data-uid="{privileges.users.uid}"{{{ if privileges.users.banned }}} data-banned{{{ end }}}>
|
|
|
|
<td>
|
|
|
|
<!-- IF ../picture -->
|
|
|
|
<img class="avatar avatar-sm" src="{privileges.users.picture}" title="{privileges.users.username}" />
|
|
|
|
<!-- ELSE -->
|
|
|
|
<div class="avatar avatar-sm" style="background-color: {../icon:bgColor};">{../icon:text}</div>
|
|
|
|
<!-- ENDIF ../picture -->
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{{ if privileges.users.banned }}}
|
|
|
|
<i class="ban fa fa-gavel text-danger" title="[[admin/manage/categories:privileges.banned-user-inheritance]]"></i>
|
|
|
|
{{{ end }}}
|
|
|
|
{privileges.users.username}
|
|
|
|
</td>
|
|
|
|
<td class="text-center"><input autocomplete="off" type="checkbox" class="checkbox-helper"></td>
|
|
|
|
{function.spawnPrivilegeStates, privileges.users.username, ../privileges}
|
|
|
|
</tr>
|
|
|
|
<!-- END privileges.users -->
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<td colspan="3"></td>
|
|
|
|
<td colspan="{privileges.keys.users.length}">
|
feat: more discrete commit-on-save instead of commit-on-change w/ confirm modals (#8541)
* feat: privileges save button, #8537, WIP
* fix: disable firefox autocomplete on privilege form fields
* feat: closes #8537 privilege changes commit on save
- new language strings for confirmation and success modals/toasts
- indeterminate privilege handling (/cc @psychobunny)
- added new discard button
- both discard and save buttons now have confirmation dialogs
* fix(tests): remove duplicate template helper test
* fix(tests): broken template helper test
* feat: confirm dialogs for all privilege copy actions
Also, ability to add user to a privilege table without needing
to refresh the privilege table.
* feat: group row addition w/o table refresh
breaking: helpers.getUserPrivileges and helpers.getGroupPrivileges
no longer make socket calls to the following hooks:
- filter:privileges.list, filter:privileges.admin.list,
filter:privileges.global.list, filter:privileges.groups.list,
filter:privileges.admin.groups.list,
filter:privileges.gloval.groups.list
The filters are still called, but done before the helper method
is called, and the results are passed in instead. This change
should only affect you if you directly call the helper methods,
otherwise the change is transparent.
* fix: stale ajaxify data on privilege category switch
* fix: implicit privileges not showing for user privs
* fix: groups, not group, also fix tests
* fix(tests): again
* fix: wrong tpl rendered when adding group to global priv table
5 years ago
|
|
|
<button type="button" class="btn btn-default pull-right" data-ajaxify="false" data-action="search.user">
|
|
|
|
<i class="fa fa-user"></i>
|
|
|
|
[[admin/manage/categories:privileges.search-user]]
|
|
|
|
</button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|