Fix permissions for editing and deleting custom repository custom columns. [SCI-1524]

This commit is contained in:
Matej Zrimšek 2017-07-28 11:57:04 +02:00
parent 61e4072c62
commit 07fea16d26

View file

@ -1075,11 +1075,13 @@ module PermissionHelper
end
def can_delete_column_in_repository(column)
is_normal_user_or_admin_of_team(column.repository.team)
column.created_by == current_user ||
is_admin_of_team(column.repository.team)
end
def can_edit_column_in_repository(column)
is_normal_user_or_admin_of_team(column.repository.team)
column.created_by == current_user ||
is_admin_of_team(column.repository.team)
end
def can_create_repository_records(repository)