-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TBT-137 Be able to use environment variables across different repos #1350
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specs!
|
||
def account_env_vars | ||
return @account_env_vars if defined? @account_env_vars | ||
@account_env_vars = Models::AccountEnvVar.where(owner_type: 'User', owner_id: id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use ||=instead
@@ -0,0 +1,7 @@ | |||
module Travis::API::V3 | |||
class Renderer::AccountEnvVar < ModelRenderer | |||
representation :standard, :id, :owner_id, :owner_type, :name, :value, :public, :created_at, :updated_at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's not public ,the value shouldn't be read/sent, is it handled somewhere?
def run! | ||
raise LoginRequired unless access_control.full_access_or_logged_in? | ||
|
||
query(:account_env_var).delete(params, access_control.user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check user roles here, might not be authorized to delete (same for create)
No description provided.