mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Owner's permissions can't be deleted
This commit is contained in:
committed by
Rob Harrington
parent
ba98c7e2c5
commit
27de66b055
@@ -35,6 +35,8 @@ angular.module("admin.enterprises")
|
||||
|
||||
$scope.removeManager = (manager) ->
|
||||
if manager.id?
|
||||
if manager.id == $scope.Enterprise.owner.id
|
||||
return
|
||||
for i, user of $scope.Enterprise.users when user.id == manager.id
|
||||
$scope.Enterprise.users.splice i, 1
|
||||
if $scope.enterprise_form?
|
||||
|
||||
Reference in New Issue
Block a user