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

Add IsAdmin & IsAuthor checks #111

Merged
merged 5 commits into from
Dec 5, 2018
Merged

Conversation

asyasky
Copy link
Collaborator

@asyasky asyasky commented Nov 6, 2018

Added checked to unblock progress on author & admin filtering. This check will be replaced by a site wide policy soon (but use these methods in the meantime and I'll take on the cleanup that results).

Copy link
Contributor

@tabascq tabascq left a comment

Choose a reason for hiding this comment

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

Other than the migration if needed, looks good!

@@ -11,7 +11,7 @@ public class EventAdmins
/// Foreign key - event table
/// </summary
[ForeignKey("Event.ID")]
public virtual EventOwners Event { get; set; }
public virtual Event Event { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs a migration

/// </summary>
/// <param name="thisEvent">The event that's being checked</param>
/// <param name="puzzleServerContext">Current PuzzleServerContext</param>
public List<Puzzle> GetPuzzlesForAuthorAndEvent(PuzzleServerContext dbContext, Event thisEvent)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would this be in this class (or this change?)

@asyasky asyasky merged commit 74d1ec6 into PuzzleServer:master Dec 5, 2018
@asyasky asyasky deleted the PolicyBasedRoles branch December 5, 2018 21:30
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