-
Notifications
You must be signed in to change notification settings - Fork 17
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
345 - NHT: Users shall be able to create stats. #357
base: master
Are you sure you want to change the base?
Conversation
rlmcneary2
commented
Jun 29, 2019
- Upgrade DB script adds a creatorId column to the DB.
- Added the creatorId to a stat to capture the user that created the stat.
- Logged in user's can now create stats.
- If a user is logged in they will see the delete icon for stats they created.
- If an admin is logged in they can delete stats that anyone has created.
- Updated the server to delete stats only when the stat was created by the current user or the current user is an admin.
@@ -225,7 +225,7 @@ export const ViewModel = DefineMap.extend('GameDetailsVM', | |||
* ``` | |||
*/ | |||
showStatMenuFor: function(player, element, event){ | |||
if(!this.session || !this.session.isAdmin()) { | |||
if(!this.session.user) { |
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.
restore check for session existence
} | ||
|
||
return function ( req, res, next ) { | ||
if ( req.user ) { |
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.
only for verified user's
return Promise.all([stat, stat.get("creatorId")]); | ||
}) | ||
.then(([stat, creatorId]) => { | ||
debugger; |
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.
remove