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

Overhaul project members page #2778

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

Conversation

williamjallen
Copy link
Collaborator

manageProjectRoles.php is one of the last remaining XSL pages, and both the UI and functionality do not match the current direction of CDash. Amongst other things, project administrators are currently given the ability to register users directly, bypassing the registration process and associated controls entirely. Project administrators are also given the ability to change users' personal notification settings.

This PR completely overhauls the project members page, changing to a new /projects/<id>/members route, adding the ability to send email invitations to users, and making the members list available to anyone who can see the page. The new page is tested thoroughly, unlike the previous page. Reviewers, if you have suggestions for more test cases, please comment below.

The new look:
image

@josephsnyder
Copy link
Member

@williamjallen, things here look quite good. I was able to get invitations through the Mailpit interface and that flow worked pretty well. Do we want to put some guardrails on the repeated invitation of a user?

Once an invitation was accepted, I'm not prevented from inviting them again. CDash would send an email but the user would be greeted with an 401 page. That being said, it is a page with a proper You are already registered message.

Additionally, there isn't any sort of indication that one is attempting to send an invitation to someone that already has an invitation open unless you're looking at the network tab of the developer console.

@williamjallen
Copy link
Collaborator Author

@josephsnyder Thanks for the careful review.

I just added client-side messages which appear in response to server-side validation errors. It would be great to add client-side validation as well in some cases, but that'll be a separate PR requiring new infrastructure.

I also added a check and associated test case to prevent invitations for existing project members. Let me know if you can think of any more edge cases I haven't covered!

@williamjallen
Copy link
Collaborator Author

It's worth noting that the MySQL tests are failing currently due to an incompatibility between column types in the migration. I'd rather leave it as-is if we're planning to get rid of MySQL in the near future, rather than using a non-ideal column type or changing the id column on the users table.

Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @williamjallen, the error message might save users a lot of confusion.

My last (Not blocking) nitpick is with the email content. It seems like this is the first HTML-content email that gets sent out from CDash, all the other examples in Mailpit are rendered as Text only. If we're going to keep it that way, can we add some structure so that it renders a little nicer?
image

Mailpit smushes it all into one line and I'm sure other mail clients will too.

@williamjallen
Copy link
Collaborator Author

@josephsnyder Good call. I didn't realize that HTML emails were the default, and I thought it was just mailpit formatting it weirdly. I'll make a PR to fix the other emails which are supposed to be text.

@williamjallen
Copy link
Collaborator Author

Requesting a brief review from @zackgalbreath to evaluate the removals and overall design of the new features here.

Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more usage complaints from me. Looks and behaves great!

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

Successfully merging this pull request may close these issues.

2 participants