Skip to content

Conversation

@rlmcneary2
Copy link

  • 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.

*/
showStatMenuFor: function(player, element, event){
if(!this.session || !this.session.isAdmin()) {
if(!this.session.user) {
Copy link
Author

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 ) {
Copy link
Author

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;
Copy link
Author

Choose a reason for hiding this comment

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

remove

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