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

Do not show Build button when user is not project admin #3309

Merged
merged 3 commits into from
Nov 27, 2017

Conversation

humitos
Copy link
Member

@humitos humitos commented Nov 23, 2017

Closes #3303

@humitos humitos requested a review from agjohnson November 23, 2017 19:12
@safwanrahman
Copy link
Member

I believe staff user should have permission to trigger any build. Sometime its necessary to trigger build for other projects for debugging purpose. But current pull request will stop doing it.

@humitos
Copy link
Member Author

humitos commented Nov 24, 2017

Well, if we want to change the permissions we also will have to change the view that I wrote the other day: Anthony told me to use the for_admin_users query at https://github.com/rtfd/readthedocs.org/blob/f93e509f1a1c33fe8040b4db06735fdb1a4876c3/readthedocs/builds/views.py#L43-L46

Otherwise, without the current PR, #3303 happens.

@agjohnson
Copy link
Contributor

We can tweak this later. For now it should match the logic that we're already checking against in the API endpoint.

@agjohnson agjohnson merged commit ebf9a40 into master Nov 27, 2017
@agjohnson agjohnson deleted the humitos/fix/dont-show-build-button branch November 27, 2017 16:50
@agjohnson
Copy link
Contributor

I'll open up another issue that will be low priority. It would be nice to have "build latest project version" and "build version" admin functions. I find myself wanting these very often.

@humitos humitos mentioned this pull request Nov 29, 2017
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.

3 participants