diff --git a/openslides/users/models.py b/openslides/users/models.py index dc0ddd529..3c56ad55d 100644 --- a/openslides/users/models.py +++ b/openslides/users/models.py @@ -146,7 +146,7 @@ class User(RESTModelMixin, PermissionsMixin, AbstractBaseUser): default_permissions = () permissions = ( ('can_see_name', 'Can see names of users'), - ('can_see_extra_data', 'Can see extra data of users'), + ('can_see_extra_data', 'Can see extra data of users (e.g. present and comment)'), ('can_manage', 'Can manage users'), ) ordering = ('last_name', 'first_name', 'username', ) diff --git a/openslides/users/signals.py b/openslides/users/signals.py index 151b083a2..34bd75ad5 100644 --- a/openslides/users/signals.py +++ b/openslides/users/signals.py @@ -147,7 +147,6 @@ def create_builtin_groups_and_admin(**kwargs): permission_dict['core.can_see_projector'], permission_dict['mediafiles.can_see'], permission_dict['motions.can_see'], - permission_dict['users.can_see_extra_data'], permission_dict['users.can_see_name'], ) group_anonymous = Group.objects.create(name='Guests', pk=1) group_anonymous.permissions.add(*base_permissions) @@ -180,15 +179,15 @@ def create_builtin_groups_and_admin(**kwargs): permission_dict['mediafiles.can_upload'], permission_dict['motions.can_create'], permission_dict['motions.can_manage'], - permission_dict['users.can_manage'], ) + permission_dict['users.can_manage'], + permission_dict['users.can_see_extra_data'],) group_staff = Group.objects.create(name='Staff', pk=4) group_staff.permissions.add(*staff_permissions) - # Add users.can_see_name and users.can_see_extra_data permissions to staff + # Add users.can_see_name permission to staff # group to ensure proper management possibilities # TODO: Remove this redundancy after cleanup of the permission system. group_staff.permissions.add( - permission_dict['users.can_see_extra_data'], permission_dict['users.can_see_name']) # Create or reset admin user diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index 3ca7b5a63..528af52cf 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -820,6 +820,9 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) $scope.permissions = permissions; $scope.group = {}; $scope.save = function (group) { + if (!group.permissions) { + group.permissions = []; + } Group.create(group).then( function(success) { $state.go('users.group.list'); diff --git a/openslides/users/static/templates/users/group-form.html b/openslides/users/static/templates/users/group-form.html index 1cb3ed56a..260108fe3 100644 --- a/openslides/users/static/templates/users/group-form.html +++ b/openslides/users/static/templates/users/group-form.html @@ -19,7 +19,7 @@