* [FIX] Wrong behaviour when copying account with permissions set. Thanks to @Edll for the feedback. Closes #1145

Signed-off-by: nuxsmin <nuxsmin@syspass.org>
This commit is contained in:
nuxsmin
2018-12-06 11:46:25 +01:00
parent 8cdceed192
commit 4df6cb9151
2 changed files with 7 additions and 2 deletions

View File

@@ -103,8 +103,6 @@ final class AccountForm extends FormBase implements FormInterface
$this->accountRequest->url = $this->request->analyzeString('url');
$this->accountRequest->notes = $this->request->analyzeString('notes');
$this->accountRequest->userEditId = $this->context->getUserData()->getId();
$this->accountRequest->otherUserEdit = (int)$this->request->analyzeBool('other_user_edit_enabled', false);
$this->accountRequest->otherUserGroupEdit = (int)$this->request->analyzeBool('other_usergroup_edit_enabled', false);
$this->accountRequest->pass = $this->request->analyzeEncrypted('password');
$this->accountRequest->isPrivate = (int)$this->request->analyzeBool('private_enabled', false);
$this->accountRequest->isPrivateGroup = (int)$this->request->analyzeBool('private_group_enabled', false);

View File

@@ -148,6 +148,13 @@
</div>
</td>
</tr>
<?php if ($_getvar('copyAction')): // Forces an update of permissions when copying from another account ?>
<input type="hidden" name="other_users_view_update" value="1">
<input type="hidden" name="other_users_edit_update" value="1">
<input type="hidden" name="other_usergroups_view_update" value="1">
<input type="hidden" name="other_usergroups_edit_update" value="1">
<?php endif; ?>
<?php endif; ?>
<?php if ($_getvar('editAction')