langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
52.36k stars 7.64k forks source link

Solution/role based app setting[WIP] #10946

Open KMerdan opened 1 day ago

KMerdan commented 1 day ago

Summary

This PR introduces a new is_admin property in the Account model and the corresponding utility method is_admin_role in the TenantAccountRole class. Additionally, it updates the AppService logic to prevent non-admin users from modifying the enable_site property. These changes enhance access control and ensure only administrators can manage critical application settings.

Key Changes: