[Bug]: Add AI permissions for Enterprise custom roles
Is there an existing issue for this?
- [x] I have searched the existing issues
To Reproduce
Custom Roles:
- Create a custom Enterprise role. The AI permission is missing from the permissions list.
- Assign the role to a user. The user cannot access AI configuration in settings or use AI features in projects.
AI buttons such as AI Assistant and Analyze Logs can still be visible, but clicking them may show an AI settings popup and then redirect to an inaccessible page or return an unauthorized error.
Current vs. Expected Behavior
Current: The ai module is missing from Enterprise custom role permissions. As a result, AI access cannot be granted to a custom role without giving the user a higher-level role such as Admin or Owner. This is inconsistent with other Enterprise resources such as registries, secrets, and S3, which can already be controlled through custom roles.
Expected: Enterprise custom roles should have Read, Create, Update, and Delete permissions for AI, allowing organizations to grant AI access without granting broader administrative permissions. AI actions should also be hidden when the user does not have ai.read, as they currently lead to flows where the user cannot proceed.
Custom AI Provider Presets should remain restricted to Admins/Owners.
Scope: This issue is specifically for Enterprise custom role AI permissions.
Which area(s) are affected? (Select all that apply)
Application, Access Control, Enterprise
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Will you send a PR?
YES