Fix: Allow organization members to access requests functionality (#2687) #2698
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes the issue where organization members with all permissions were unable to see or activate the requests functionality, even when the owner had granted them all permissions.
Problem
Root Cause
The requests-related API procedures were using
adminProcedurewhich only allows users with the "owner" role to access them. This meant that even members with all permissions couldn't access the requests functionality.Solution
Changed the following procedures from
adminProceduretoprotectedProcedure:readStatsLogs- Used to display requests data in the tablehaveActivateRequests- Used to check if requests are activatedtoggleRequests- Used to activate/deactivate requestsupdateLogCleanup- Used to update log cleanup schedulegetLogCleanupStatus- Used to get current log cleanup statusChanges Made
apps/dokploy/server/api/routers/settings.tsadminProceduretoprotectedProcedureTesting
protectedProcedure(allows any authenticated user)Related Issue
Fixes #2687