Implement views that should utilize authorization #1131
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#1131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
In issue #993 the endpoints were identified. You shall in this issue implement this.
After reviewing the current frontend views and backend endpoints/services, this is my suggested authorization split.
Views/endpoints that should require login:
Settings.jsThis view handles account-related functionality such as changing password, enabling/disabling 2FA, changing email and future account settings. These actions should only be available for authenticated users.
Change password view/endpoint
Password changes are sensitive account operations and should always require the user to already be logged in.
Delete account view/endpoint
Deleting an account is a destructive action and should require authentication and confirmation.
Saved dashboard layout/settings (
useGridSave)Dashboard layouts, saved cards and personalized settings are user-specific data and should only be accessible for the authenticated user who owns them.
Add/remove/reset dashboard cards if saved per user
If dashboard state is stored server-side, users should only be able to modify their own dashboard configuration.
Any future profile/account management views
Future profile pages, email updates, security settings or personalization features should require login.
Any endpoint returning user-specific data
Endpoints returning user settings, dashboard layouts, account data or personalized content should require authorization.
Views/endpoints that should require admin authorization:
/roombooking/createMockupThis endpoint creates mock/test data and should not be available publicly in production environments.
/roombooking/delete/{id}This endpoint deletes booking data and should require authorization. It should preferably use HTTP DELETE instead of GET.
Future mock/debug/test endpoints
Internal development/testing endpoints should only be accessible by admins or developers.
Future sensor management endpoints
Endpoints that create, update or delete sensors should require admin authorization.
Future user management endpoints
Managing users, roles, permissions or deleting other users should require admin privileges.
Views/endpoints that can stay public:
/auth/loginMust remain public because users need access before authentication.
/auth/SignUpMust remain public so new users can create accounts.
Weather/SMHI views/endpoints
Public read-only weather data from external APIs.
Temperature views/endpoints
Read-only sensor/statistics data with no user-specific information.
Energy views/endpoints
Public energy statistics and read-only monitoring data.
Parking views/endpoints
Public parking availability information without personal/user-related data.
Room booking read/search endpoints
Read-only booking and room availability information.
MapViewDisplays public/static map information.
ScheduleViewCan remain public if it only uses public TimeEdit schedule data.
SudokuViewPublic game/API functionality with no user-specific data.
ImageViewPublic/static image display functionality.
TextViewPublic informational/static text content.
About/Legal/Support/Socials pages
Informational public pages should remain accessible without login.
Additional notes:
EnergyEndpoints./roombooking/delete/{id}should preferably use HTTP DELETE instead of GET because it performs a destructive operation.Originally posted by @b25marem in #993 (comment)
What should be done