Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tonoyansergey-devt
Copy link

No description provided.

Copy link
Collaborator

@gbarc-dt gbarc-dt left a 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)
Copy link
Collaborator

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
Copy link
Collaborator

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)
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants