give all users permission to create instances in sandboxes
This commit is contained in:
parent
a6a611291c
commit
2a31ea0b01
@ -93,11 +93,16 @@ module Devops
|
||||
def check_authorization user_id, env
|
||||
e = self.deploy_env(env)
|
||||
return true if user_id == User::ROOT_USER_NAME
|
||||
return true if is_sandbox?
|
||||
return e.users.include? user_id
|
||||
rescue RecordNotFound => e
|
||||
return false
|
||||
end
|
||||
|
||||
def is_sandbox?
|
||||
id.start_with?('sandbox-')
|
||||
end
|
||||
|
||||
=begin
|
||||
def validate!
|
||||
super
|
||||
|
||||
Loading…
Reference in New Issue
Block a user