Hide identifier field in motion update form if the user is delegate (fixes #3528)
This commit is contained in:
parent
541e1edb27
commit
264b6f7d34
@ -1961,10 +1961,12 @@ angular.module('OpenSlidesApp.motions.site', [
|
|||||||
'Agenda',
|
'Agenda',
|
||||||
'AgendaUpdate',
|
'AgendaUpdate',
|
||||||
'motionId',
|
'motionId',
|
||||||
|
'operator',
|
||||||
'ErrorMessage',
|
'ErrorMessage',
|
||||||
'EditingWarning',
|
'EditingWarning',
|
||||||
function($scope, $state, Motion, Category, Config, Mediafile, MotionForm,
|
function($scope, $state, Motion, Category, Config, Mediafile, MotionForm,
|
||||||
Tag, User, Workflow, Agenda, AgendaUpdate, motionId, ErrorMessage, EditingWarning) {
|
Tag, User, Workflow, Agenda, AgendaUpdate, motionId, operator, ErrorMessage,
|
||||||
|
EditingWarning) {
|
||||||
Category.bindAll({}, $scope, 'categories');
|
Category.bindAll({}, $scope, 'categories');
|
||||||
Mediafile.bindAll({}, $scope, 'mediafiles');
|
Mediafile.bindAll({}, $scope, 'mediafiles');
|
||||||
Tag.bindAll({}, $scope, 'tags');
|
Tag.bindAll({}, $scope, 'tags');
|
||||||
@ -1984,8 +1986,8 @@ angular.module('OpenSlidesApp.motions.site', [
|
|||||||
// override default values for update form
|
// override default values for update form
|
||||||
for (var i = 0; i < $scope.formFields.length; i++) {
|
for (var i = 0; i < $scope.formFields.length; i++) {
|
||||||
if ($scope.formFields[i].key == "identifier") {
|
if ($scope.formFields[i].key == "identifier") {
|
||||||
// show identifier field
|
// show identifier field if the operator has manage permissions
|
||||||
$scope.formFields[i].hide = false;
|
$scope.formFields[i].hide = !operator.hasPerms('motions.can_manage');
|
||||||
}
|
}
|
||||||
if ($scope.formFields[i].key == "title") {
|
if ($scope.formFields[i].key == "title") {
|
||||||
// get title of latest version
|
// get title of latest version
|
||||||
|
Loading…
Reference in New Issue
Block a user