-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP: isOwner = true if the user is a repo collaborator #16
Merged
raykyri
merged 20 commits into
main
from
rjwebb/grant_repo_collaborators_moderator_access
Dec 15, 2023
Merged
WIP: isOwner = true if the user is a repo collaborator #16
raykyri
merged 20 commits into
main
from
rjwebb/grant_repo_collaborators_moderator_access
Dec 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…/grant_repo_collaborators_moderator_access
* upgrade to express 4 * upgrade to express 5 * client, server: remove headersJson files, set headers in express middleware --------- Co-authored-by: Bob Webb <bob.wbb@gmail.com>
This reverts commit a96efd9.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the
isOwner
function on the server to additionally check if the user is a repository collaborator on the proposals repository, i.e. that their entry in theusers
database hasis_repo_collaborator
set to true. This means that any endpoint that requires the user to be an owner (which includes administrators from the ADMIN_UIDS env var) can now also be called by repo collaborators.It also adds a line to the Account page that says whether the user is a repo collaborator:
![Screenshot 2023-12-08 at 5 13 27 pm](https://private-user-images.githubusercontent.com/457206/289141319-3680b184-fc27-47eb-841e-3b90562b0b35.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MTk0MDQsIm5iZiI6MTcyMDUxOTEwNCwicGF0aCI6Ii80NTcyMDYvMjg5MTQxMzE5LTM2ODBiMTg0LWZjMjctNDdlYi04NDFlLTNiOTA1NjJiMGIzNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwOVQwOTU4MjRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hMDE4MjFmYTBhODY3NmFiNWJlOWQ2N2QxMzE0NjE5MWRlODNiMjcxOTRiMzFjMmJhNWU4MzUxOTc3Y2Q5NTZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.bvz4qS92WKdFhcRdVEZu-LvGQ-SBr7RG67hNO6n0FmI)
Other changes:
c.hname
filter from the manage conversations page - I don't know how this got in there a6b75acqueryP
to be an object with arows
field 4a62d6cisAdministrator
check out of the loop that iterates over the conversations, this only needs to be done once f3cd31aTo do:
QA test all of the moderator behaviours