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:
parent
9aa69a3fac
commit
d48e5602ce
@ -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
|
||||
|
@ -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')
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user