@@ -143,17 +143,19 @@ dashboards, charts, and datasets. Subjects come in three types:
143143
144144Subjects are used throughout Superset to assign ** editors** (who can modify a resource) and
145145** viewers** (who can view it). For new resource-specific assignments, Superset defaults to
146- ** Users** and ** Groups** in subject pickers. Groups are the recommended way to grant access to a
147- set of people because they represent organizational membership, while roles remain focused on
148- capability grants such as "can read dashboards" or "can write charts".
146+ ** Users** and ** Groups** in dashboard, chart, and alert/report subject pickers. The Row Level
147+ Security picker also includes ** Roles** by default to preserve role-based RLS workflows. Groups
148+ are the recommended way to grant access to a set of people because they represent organizational
149+ membership, while roles remain focused on capability grants such as "can read dashboards" or
150+ "can write charts".
149151
150152Role subjects are still supported for backwards compatibility with features that previously used
151153roles directly, including Row Level Security role assignments and ` DASHBOARD_RBAC ` . Existing role
152154subject assignments continue to be enforced even when roles are not exposed in the default picker
153- configuration. However, when an administrator edits a subject list, roles are not available as new
154- dropdown values unless that picker has been configured to expose role subjects . Roles are not
155- recommended for new subject assignments, because using roles for both permissions and resource
156- membership couples two separate concerns.
155+ configuration. The RLS picker exposes roles by default; other subject pickers do not expose roles
156+ as new dropdown values unless configured to do so . Roles are not recommended for new
157+ resource-specific assignments, because using roles for both permissions and resource membership
158+ couples two separate concerns.
157159
158160Administrators can control which subject types are available in pickers with
159161` SUBJECTS_RELATED_TYPES ` . By default, this setting exposes only users and groups:
@@ -167,8 +169,10 @@ SUBJECTS_RELATED_TYPES = [
167169]
168170```
169171
170- Set ` SUBJECTS_RELATED_TYPES = None ` to expose all subject types, including roles. To expose roles
171- only for a specific entity, set that entity's override:
172+ Set ` SUBJECTS_RELATED_TYPES = None ` to expose all subject types globally, including roles.
173+
174+ The RLS picker has the following entity-specific default so role-based RLS rules remain
175+ selectable:
172176
173177``` python
174178from superset.subjects.types import SubjectType
@@ -178,16 +182,16 @@ SUBJECTS_RELATED_TYPES = [
178182 SubjectType.GROUP ,
179183]
180184
181- # Leave dashboard, chart, and alert/report overrides unset so they inherit
182- # the users + groups default. Expose roles only in the RLS subject picker for
183- # compatibility with existing role-based RLS workflows.
184185SUBJECTS_RELATED_TYPES_RLS = [
185186 SubjectType.USER ,
186- SubjectType.GROUP ,
187187 SubjectType.ROLE ,
188+ SubjectType.GROUP ,
188189]
189190```
190191
192+ Dashboard, chart, and alert/report overrides remain ` None ` by default and inherit the global
193+ users-and-groups setting. Set an entity-specific override explicitly to customize its picker.
194+
191195Available per-entity overrides are:
192196
193197- ` SUBJECTS_RELATED_TYPES_DASHBOARDS ` for dashboard editor/viewer pickers
0 commit comments