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

[ENHANCEMENT] Add an admin account #14

Open
6 of 10 tasks
SethCram opened this issue Jan 29, 2023 · 0 comments
Open
6 of 10 tasks

[ENHANCEMENT] Add an admin account #14

SethCram opened this issue Jan 29, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@SethCram
Copy link
Owner

SethCram commented Jan 29, 2023

Is your feature request related to a problem? Please describe.

  • Yes, there should be some features available for maintenance and additional not available to regular users

Describe the solution you'd like

  • Add an admin account that can create new categories, and do other things

Describe alternatives you've considered

  • these things could be added as needed manually thru mongoDB Atlas interface

Additional context

  • could be implemented through manual change to user model using a "isAdmin" boolean field
    • then use this field to differentiate between logged in users + logged in admin users

Development

  • manual change to user model using an "isAdmin" boolean field

  • manually make an account an admin

  • let them delete or update any post

    • isAdmin not properly set within jwt
      • possibly bc isAdmin init'd to a boolean?
      • change to user model had not been impl'd yet
  • let them update any comment

    • comment deletion not yet implemented
  • let them delete any user

    • linked btn on sidebar
    • ensured jwt auth'd to check isAdmin
  • let them delete comments

    • proposed in [ENHANCEMENT] Comment section improvements #34 for author too
    • root comment deletion works properly
    • when try to delete a reply comment, deletes it but doesnt rm it from root comment's replies arr
      • would be easier if every reply comment had a "rootComment" field
      • wouldn't have to follow the chain of replyId's
      • did alota this rework in [BUG] Comment related bugs #38
    • used the pull operation to rm the subdocument from the root comment
    • verified it worked on all manner of comment types by author and admin
  • let them delete categories

    • would also needa delete the category from the posts it's linked under if any?
  • create + let them access admin dashboard

    • but should only be accessible by admins
    • all admin privileges and responsibilities should be consolidated here
      • such as all posts or comments that've been flagged
      • and fake data insertion/deletion
  • allow admin to remove all flags from a post/comment

  • could allow them access to running fake data insertion and deletion script via a form

    • not sure how to link cmd line script to frontend tho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 👀 In review
Development

No branches or pull requests

1 participant