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

Team navigation & partial auth #155

Merged
merged 9 commits into from
Jan 13, 2019
Merged

Conversation

jenetlan
Copy link
Contributor

No description provided.

@@ -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)
Copy link
Contributor

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'?

Copy link
Contributor Author

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")]
Copy link
Contributor

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?

Copy link
Contributor Author

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

@jenetlan jenetlan merged commit 14d462a into PuzzleServer:master Jan 13, 2019
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