-
Notifications
You must be signed in to change notification settings - Fork 32
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
Team navigation & partial auth #155
Conversation
…to their team's page!
…the 'Team' menu item at the top
Updates to remove create new for authors and show it on the 'no team' page for players if the event is open for registration
@@ -8,7 +8,7 @@ | |||
<h2>All Teams</h2> | |||
|
|||
<p> | |||
@if (Model.Event.IsTeamRegistrationActive) // Or current user is admin | |||
@if (Model.Event.IsTeamRegistrationActive && Model.EventRole == ModelBases.EventRole.admin) |
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.
Should this be an 'or' instead of an 'and'?
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.
There was a change since the comment - this page is only going to be for authors & admins, so if you're not an admin you can't create a team (since authors can't create teams)
using Microsoft.AspNetCore.Identity; | ||
using Microsoft.EntityFrameworkCore; | ||
using ServerCore.DataModel; | ||
using ServerCore.ModelBases; | ||
|
||
namespace ServerCore.Pages.Teams | ||
{ | ||
[Authorize(Policy = "IsEventAdminOrEventAuthor")] |
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.
Since this is becoming an admin view, would it make sense to rename it and make the index be the player page?
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.
I think that causes a lot of issues with the navigation we have in place (getting to / from teams list) - for now if it's ok I'll leave it
No description provided.