1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

[bug] admins can't edit members projects

This commit is contained in:
Sylvain 2019-10-22 14:18:43 +02:00
parent 9aa69a3fac
commit d48e5602ce
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
# Changelog Fab Manager
- Fix a bug: admins can't edit members projects
## v4.2.2 2019 October 22
- Fix a bug: PostgreSQL upgrade script won't run on some systems

View File

@ -470,7 +470,7 @@ Application.Controllers.controller('EditProjectController', ['$rootScope', '$sco
const initialize = function () {
CSRF.setMetaTags();
if ($scope.project.author_id !== $rootScope.currentUser.id && $scope.project.user_ids.indexOf($rootScope.currentUser.id) === -1) {
if ($scope.project.author_id !== $rootScope.currentUser.id && $scope.project.user_ids.indexOf($rootScope.currentUser.id) === -1 && $scope.currentUser.role !== 'admin') {
$state.go('app.public.projects_show', { id: $scope.project.slug });
console.error('[EditProjectController::initialize] user is not allowed')
}