Class: DbdocAdmin::BaseController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- DbdocAdmin::BaseController
- Defined in:
- app/controllers/dbdoc_engine/dbdoc_admin/base_controller.rb
Direct Known Subclasses
DashboardController, DataTransferController, DbDesignDynamicTablesController, DbDesignTableGroupsController
Instance Method Summary collapse
-
#can_delete? ⇒ Boolean
Checks if the current user has permission to delete resources.
-
#can_edit? ⇒ Boolean
Checks if the current user has permission to edit resources.
Instance Method Details
#can_delete? ⇒ Boolean
Checks if the current user has permission to delete resources. Only users with the 'superadmin' role are allowed.
16 17 18 |
# File 'app/controllers/dbdoc_engine/dbdoc_admin/base_controller.rb', line 16 def can_delete? current_user.superadmin? end |
#can_edit? ⇒ Boolean
Checks if the current user has permission to edit resources. Typically allows access for users with the 'admin' role or higher.
10 11 12 |
# File 'app/controllers/dbdoc_engine/dbdoc_admin/base_controller.rb', line 10 def can_edit? current_user.admin_or_higher? end |