-
Notifications
You must be signed in to change notification settings - Fork 26
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
Auth0 Integration and Role-Based Access Control for Event Data Management #160
base: dev
Are you sure you want to change the base?
Auth0 Integration and Role-Based Access Control for Event Data Management #160
Conversation
@MAVRICK-1 @devsayanR please check the pr |
9b14c2a
to
09b0f6b
Compare
@Chayan8837 great work, @devsayanR could you please review it once |
src/app/(site)/createEvent/page.tsx
Outdated
@@ -64,7 +67,7 @@ const CreateEventPage: React.FC = () => { | |||
if (eventData.imageFile) { | |||
const formData = new FormData(); | |||
formData.append("image", eventData.imageFile); // Append image file | |||
formData.append("key", "f43b433f78cbc31cb8db83f31f76ee8c"); // Your ImgBB API key | |||
formData.append("key", "6658a35ca5550b19a3b5bbd33fec2ed7"); // Your ImgBB API key |
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.
Hey you haven't put the api key into the .env
file??
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.
No , base branch , using the apy key directly ,so I just add mine ,but I will chnge it before merge ,
And the firabase config too ..
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.
ok , add this api key in env fie
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.
Good
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.
any other chnges ?
Auth0 Integration and Role-Based Access Control for Event Data Management
Description
This PR implements the integration of Auth0 authentication and role-based access control (RBAC) to manage event data. Admin users can now modify event data, while regular users are restricted from accessing or editing event data.
Fixes #133
Type of change
Implementation Details
1. User Model Modification:
role
field to the user model in the database, where the role can be changed by an admin (via the backend/database).2. Event Data API:
admin
role can access and modify event data.3. Role Verification Middleware:
4. Event Page UI:
5. Token Update Middleware:
6. Error Handling:
Proper error handling for unauthorized access attempts to ensure users receive meaningful messages when trying to access restricted functionalities.
user view

admin view

client Middleware
-- user permisions
Test Configuration:
Checklist: