-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: Admin and Mods #149
base: main
Are you sure you want to change the base?
Feat: Admin and Mods #149
Conversation
|
GitGuardian id | Secret | Commit | Filename | |
---|---|---|---|---|
7593849 | Bearer Token | b3d471d | features/admin/requests.http | View secret |
7604142 | Bearer Token | 90cd8ca | features/admin/requests.http | View secret |
7604142 | Bearer Token | 90cd8ca | features/admin/requests.http | View secret |
7605208 | Bearer Token | 157ee03 | features/admin/requests.http | View secret |
7605209 | Bearer Token | 157ee03 | features/admin/requests.http | View secret |
7619465 | Bearer Token | 7c1a908 | features/admin/requests.http | View secret |
7619466 | Bearer Token | 7c1a908 | features/admin/requests.http | View secret |
7619465 | Bearer Token | 7c1a908 | features/admin/requests.http | View secret |
7619467 | Bearer Token | 7c1a908 | features/admin/requests.http | View secret |
7658849 | Bearer Token | db72772 | features/admin/requests.http | View secret |
7658850 | Bearer Token | db72772 | features/admin/requests.http | View secret |
7658851 | Bearer Token | db72772 | features/admin/requests.http | View secret |
7658852 | Bearer Token | db72772 | features/reports/requests.http | View secret |
7658852 | Bearer Token | db72772 | features/posts/requests.http | View secret |
7658852 | Bearer Token | db72772 | features/comments/requests.http | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
features/admin/router.go
Outdated
mux.GET("/report", h.handleGetReportById) // TODO: Reports do not have school_id | ||
mux.GET("/reports", h.handleGetReports) // TODO: Reports do not have school_id | ||
mux.GET("/comments-by-report", h.handleGetRankedCommentsByReport) // TODO: Reports do not have school_id | ||
mux.GET("/posts-by-report", h.handleGetRankedPostsByReport) // TODO: Reports do not have school_id | ||
mux.GET("/reports-for-comment", h.handleFetchReportForCommentById) // TODO: Reports do not have school_id | ||
mux.GET("/reports-for-post", h.handleFetchReportForPostById) // TODO: Reports do not have school_id | ||
|
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.
TODOs?
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.
Todoing
@@ -347,6 +348,7 @@ type Report struct { | |||
Post *Post `gorm:"foreignKey:PostID" json:"post,omitempty"` // Use "omitempty" here | |||
CommentID *uint `db:"comment_id" gorm:"default:NULL" json:"-"` | |||
Comment *Comment `gorm:"foreignKey:CommentID" json:"comment,omitempty"` // Use "omitempty" here | |||
SchoolID uint `gorm:"column:school_id" json:"-"` |
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.
nice school id
Features
Adds
/set-user-roles
endpoint taking inuser_id
being the user's id being setroles
being the roles wanting to useaction
either beingset
,add
, orremove
Also does some organization of admin router,
Adds Mods related endpoints,
Adds Strict or Relaxed roles setting for middleware (either all the roles need to match or one)
Adds Role Assignment Logs table to Postgres
Adds Uni Specific Endpoints
Adds Uni Specific Mod Ranks
Notes
Closes #147