Merge pull request #5423 from emanuelschuetze/rename-permission
Rename and check "can see extra data" permission.
This commit is contained in:
commit
d53e85b853
@ -347,7 +347,7 @@ _('Can manage motion polls');
|
||||
|
||||
// users
|
||||
_('Can see names of users');
|
||||
_('Can see extra data of users (e.g. present and comment)');
|
||||
_('Can see extra data of users (e.g. email and comment)');
|
||||
_('Can manage users');
|
||||
_('Can change its own password');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<h4>
|
||||
<span>{{ 'Submitters' | translate }}</span>
|
||||
<span class="title-font">{{ 'Submitters' | translate }}</span>
|
||||
<button
|
||||
class="small-button"
|
||||
type="button"
|
||||
|
@ -250,8 +250,10 @@
|
||||
<h4>{{ 'Name' | translate }}</h4>
|
||||
<span class="state-icons">
|
||||
<span>{{ user.short_name }}</span>
|
||||
<mat-icon *ngIf="user.is_present" matTooltip="{{ 'Is present' | translate }}">check_box</mat-icon>
|
||||
<mat-icon *ngIf="user.is_committee" matTooltip="{{ 'Is committee' | translate }}"
|
||||
<mat-icon *ngIf="user.is_present && isAllowed('seeName')" matTooltip="{{ 'Is present' | translate }}"
|
||||
>check_box</mat-icon
|
||||
>
|
||||
<mat-icon *ngIf="user.is_committee && isAllowed('seeName')" matTooltip="{{ 'Is committee' | translate }}"
|
||||
>account_balance</mat-icon
|
||||
>
|
||||
<mat-icon *ngIf="!user.is_active && isAllowed('seeExtra')" matTooltip="{{ 'Inactive' | translate }}"
|
||||
@ -260,19 +262,19 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="isAllowed('seePersonal')">
|
||||
<!-- Mail -->
|
||||
<div *ngIf="isAllowed('seePersonal')">
|
||||
<div *ngIf="user.email">
|
||||
<h4>{{ 'Email' | translate }}</h4>
|
||||
<span>{{ user.email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gender -->
|
||||
<div *ngIf="user.gender">
|
||||
<h4>{{ 'Gender' | translate }}</h4>
|
||||
<span>{{ user.gender | translate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Structure Level -->
|
||||
<div *ngIf="user.structure_level">
|
||||
@ -305,6 +307,12 @@
|
||||
<span>{{ user.vote_weight }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Username -->
|
||||
<div *ngIf="user.username">
|
||||
<h4>{{ 'Username' | translate }}</h4>
|
||||
<span>{{ user.username }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Initial Password -->
|
||||
<div *ngIf="user.default_password">
|
||||
<h4>{{ 'Initial password' | translate }}</h4>
|
||||
@ -312,18 +320,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="isAllowed('seePersonal')">
|
||||
<div *ngIf="isAllowed('seeName')">
|
||||
<!-- About me -->
|
||||
<div *ngIf="user.about_me">
|
||||
<h4>{{ 'About me' | translate }}</h4>
|
||||
<div [innerHTML]="user.about_me | trust: 'html'"></div>
|
||||
</div>
|
||||
|
||||
<!-- Username -->
|
||||
<div *ngIf="user.username">
|
||||
<h4>{{ 'Username' | translate }}</h4>
|
||||
<span>{{ user.username }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="isAllowed('seeExtra')">
|
||||
|
@ -193,10 +193,10 @@ export class UserDetailComponent extends BaseViewComponent implements OnInit {
|
||||
*
|
||||
* actions might be:
|
||||
* - delete (deleting the user) (users.can_manage and not ownPage)
|
||||
* - seeName (title, first, last) (user.can_see_name or ownPage)
|
||||
* - seeOtherUsers (title, first, last) (user.can_see_name)
|
||||
* - seeExtra (checkboxes, comment) (user.can_see_extra_data)
|
||||
* - seePersonal (mail, username, about, gender, structure level) (user.can_see_extra_data or ownPage)
|
||||
* - seeName (title, first, last, gender, about) (user.can_see_name or ownPage)
|
||||
* - seeOtherUsers (title, first, last, gender, about) (user.can_see_name)
|
||||
* - seeExtra (email, comment, is_active, last_email_send) (user.can_see_extra_data)
|
||||
* - seePersonal (mail, username, structure level) (user.can_see_extra_data or ownPage)
|
||||
* - manage (everything) (user.can_manage)
|
||||
* - changePersonal (mail, username, about) (user.can_manage or ownPage)
|
||||
* - changePassword (user.can_change_password)
|
||||
|
@ -80,6 +80,7 @@ body {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
.title-font,
|
||||
.slidetitle h1,
|
||||
.slidetitle h2 {
|
||||
|
29
openslides/users/migrations/0014_user_rename_permission.py
Normal file
29
openslides/users/migrations/0014_user_rename_permission.py
Normal file
@ -0,0 +1,29 @@
|
||||
# Generated by Django 2.2.12 on 2020-06-15 19:59
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("users", "0013_user_vote_weight"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="user",
|
||||
options={
|
||||
"default_permissions": (),
|
||||
"ordering": ("last_name", "first_name", "username"),
|
||||
"permissions": (
|
||||
("can_see_name", "Can see names of users"),
|
||||
(
|
||||
"can_see_extra_data",
|
||||
"Can see extra data of users (e.g. email and comment)",
|
||||
),
|
||||
("can_change_password", "Can change its own password"),
|
||||
("can_manage", "Can manage users"),
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
@ -172,7 +172,7 @@ class User(RESTModelMixin, PermissionsMixin, AbstractBaseUser):
|
||||
("can_see_name", "Can see names of users"),
|
||||
(
|
||||
"can_see_extra_data",
|
||||
"Can see extra data of users (e.g. present and comment)",
|
||||
"Can see extra data of users (e.g. email and comment)",
|
||||
),
|
||||
("can_change_password", "Can change its own password"),
|
||||
("can_manage", "Can manage users"),
|
||||
|
@ -26,11 +26,11 @@ USERCANSEESERIALIZER_FIELDS = (
|
||||
"is_present",
|
||||
"is_committee",
|
||||
"vote_weight",
|
||||
"gender",
|
||||
)
|
||||
|
||||
|
||||
USERCANSEEEXTRASERIALIZER_FIELDS = USERCANSEESERIALIZER_FIELDS + (
|
||||
"gender",
|
||||
"email",
|
||||
"last_email_send",
|
||||
"comment",
|
||||
|
Loading…
Reference in New Issue
Block a user