mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Fix manage repository permissions [SCI-2136]
This commit is contained in:
parent
cae726f5c3
commit
bd9f5c1cda
2 changed files with 2 additions and 2 deletions
|
@ -105,7 +105,7 @@ end
|
|||
Canaid::Permissions.register_for(Repository) do
|
||||
# repository: update, delete
|
||||
can :manage_repository do |user, repository|
|
||||
can_create_repositories?(user, repository.team)
|
||||
user.is_admin_of_team?(repository.team)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="true"
|
||||
<%= "disabled='disabled'" if !can_manage_repository?(repository) && !can_create_repositories?(repository.team) %>>
|
||||
<%= "disabled='disabled'" unless can_manage_repository?(repository) || can_create_repositories?(repository.team) %>>
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
<span class="caret"></span>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue