Compare commits
4 commits
master
...
bugfix/185
Author | SHA1 | Date | |
---|---|---|---|
|
6f932caf73 | ||
|
2978dae22b | ||
|
4ddf5f700c | ||
|
51a994690c |
18 changed files with 18 additions and 11 deletions
|
@ -1418,6 +1418,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
|
|||
#app-content.user-list-grid {
|
||||
display: grid;
|
||||
grid-column-gap: 20px;
|
||||
grid-auto-rows: minmax(60px, max-content);
|
||||
|
||||
.row {
|
||||
// TODO replace with css4 subgrid when available
|
||||
|
@ -1561,10 +1562,12 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
|
|||
}
|
||||
|
||||
> div,
|
||||
> .displayName > form,
|
||||
> form {
|
||||
grid-row: 1;
|
||||
display: inline-flex;
|
||||
color: var(--color-text-lighter);
|
||||
flex-grow: 1;
|
||||
|
||||
> input:not(:focus):not(:active) {
|
||||
border-color: transparent;
|
||||
|
@ -1591,6 +1594,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
|
|||
&.mailAddress {
|
||||
> input {
|
||||
text-overflow: ellipsis;
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -318,7 +318,7 @@ export default {
|
|||
}
|
||||
if (!this.settings.isAdmin) {
|
||||
// we don't want subadmins to edit themselves
|
||||
return this.users.filter(user => user.enabled !== false && user.id !== OC.getCurrentUser().uid)
|
||||
return this.users.filter(user => user.enabled !== false)
|
||||
}
|
||||
return this.users.filter(user => user.enabled !== false)
|
||||
},
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
<div v-if="showConfig.showLastLogin" />
|
||||
|
||||
<div class="userActions">
|
||||
<div v-if="OC.currentUser !== user.id && user.id !== 'admin' && !loading.all"
|
||||
<div v-if="!loading.all"
|
||||
class="toggleUserActions">
|
||||
<Actions>
|
||||
<ActionButton icon="icon-checkmark"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</div>
|
||||
|
||||
<div class="userActions">
|
||||
<div v-if="canEdit && !loading.all" class="toggleUserActions">
|
||||
<div v-if="canEditUser(user) && !loading.all" class="toggleUserActions">
|
||||
<Actions>
|
||||
<ActionButton icon="icon-rename" @click="toggleEdit">
|
||||
{{ t('settings', 'Edit User') }}
|
||||
|
@ -79,7 +79,6 @@
|
|||
<script>
|
||||
import { PopoverMenu, Actions, ActionButton } from '@nextcloud/vue'
|
||||
import ClickOutside from 'vue-click-outside'
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
|
||||
import UserRowMixin from '../../mixins/UserRowMixin'
|
||||
export default {
|
||||
|
@ -144,10 +143,9 @@ export default {
|
|||
}
|
||||
return t('settings', '{size} used', { size: OC.Util.humanFileSize(0) })
|
||||
},
|
||||
canEdit() {
|
||||
return getCurrentUser().uid !== this.user.id && this.user.id !== 'admin'
|
||||
canEditUser() {
|
||||
return (user) => this.settings.isAdmin || user.id !== OC.getCurrentUser().uid
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
hideMenu() {
|
||||
|
|
|
@ -53,7 +53,7 @@ export default new Router({
|
|||
name: 'users',
|
||||
children: [
|
||||
{
|
||||
path: ':selectedGroup(.*)',
|
||||
path: ':selectedGroup',
|
||||
name: 'group',
|
||||
component: Users,
|
||||
},
|
||||
|
|
|
@ -49,10 +49,11 @@
|
|||
</AppNavigationCounter>
|
||||
</AppNavigationItem>
|
||||
<AppNavigationItem
|
||||
v-if="settings.isAdmin"
|
||||
id="admin"
|
||||
:exact="true"
|
||||
:title="t('settings', 'Admins')"
|
||||
:to="{ name: 'users', params: { selectedGroup: 'admin' } }"
|
||||
:to="{ name: 'group', params: { selectedGroup: 'admin' } }"
|
||||
icon="icon-user-admin">
|
||||
<AppNavigationCounter v-if="adminGroupMenu.count" slot="counter">
|
||||
{{ adminGroupMenu.count }}
|
||||
|
@ -65,7 +66,7 @@
|
|||
id="disabled"
|
||||
:exact="true"
|
||||
:title="t('settings', 'Disabled users')"
|
||||
:to="{ name: 'users', params: { selectedGroup: 'disabled' } }"
|
||||
:to="{ name: 'group', params: { selectedGroup: 'disabled' } }"
|
||||
icon="icon-disabled-users">
|
||||
<AppNavigationCounter v-if="disabledGroupMenu.usercount > 0" slot="counter">
|
||||
{{ disabledGroupMenu.usercount }}
|
||||
|
@ -78,7 +79,7 @@
|
|||
:key="group.id"
|
||||
:exact="true"
|
||||
:title="group.title"
|
||||
:to="{ name: 'users', params: { selectedGroup: group.id } }">
|
||||
:to="{ name: 'group', params: { selectedGroup: group.id } }">
|
||||
<AppNavigationCounter v-if="group.count" slot="counter">
|
||||
{{ group.count }}
|
||||
</AppNavigationCounter>
|
||||
|
@ -489,6 +490,10 @@ export default {
|
|||
*/
|
||||
formatGroupMenu(group) {
|
||||
const item = {}
|
||||
if (typeof group === 'undefined') {
|
||||
return {}
|
||||
}
|
||||
|
||||
item.id = group.id
|
||||
item.title = group.name
|
||||
item.usercount = group.usercount
|
||||
|
|
Loading…
Reference in a new issue