Skip to content

Commit

Permalink
Revert "feat: FF the dashboard CRUD view with the DASHBOARD_RBAC"
Browse files Browse the repository at this point in the history
This reverts commit 80c26ae
  • Loading branch information
amitmiran137 committed Jan 30, 2021
1 parent 80c26ae commit 812bb87
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions superset/views/dashboard/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,12 @@
# under the License.
from flask_babel import lazy_gettext as _

from ... import is_feature_enabled
from ...dashboards.filters import DashboardFilter
from ..base import check_ownership

roles_edit = []
roles_description = {}
roles_label = {}
if is_feature_enabled("DASHBOARD_RBAC"):
roles_edit = "roles"
roles_description = {
"roles": _(
"Roles is a list which defines access to the dashboard. "
"These roles are always applied in addition to restrictions on dataset "
"level access. "
"If no roles defined then the dashboard is available to all roles."
)
}
roles_label = {"roles": _("Roles")}


class DashboardMixin: # pylint: disable=too-few-public-methods

list_title = _("Dashboards")
show_title = _("Show Dashboard")
add_title = _("Add Dashboard")
Expand All @@ -48,7 +33,7 @@ class DashboardMixin: # pylint: disable=too-few-public-methods
"dashboard_title",
"slug",
"owners",
roles_edit,
"roles",
"position_json",
"css",
"json_metadata",
Expand Down Expand Up @@ -78,7 +63,12 @@ class DashboardMixin: # pylint: disable=too-few-public-methods
"want to alter specific parameters."
),
"owners": _("Owners is a list of users who can alter the dashboard."),
**roles_description,
"roles": _(
"Roles is a list which defines access to the dashboard. "
"These roles are always applied in addition to restrictions on dataset "
"level access. "
"If no roles defined then the dashboard is available to all roles."
),
"published": _(
"Determines whether or not this dashboard is "
"visible in the list of all dashboards"
Expand All @@ -91,7 +81,7 @@ class DashboardMixin: # pylint: disable=too-few-public-methods
"slug": _("Slug"),
"charts": _("Charts"),
"owners": _("Owners"),
**roles_label,
"roles": _("Roles"),
"published": _("Published"),
"creator": _("Creator"),
"modified": _("Modified"),
Expand Down

0 comments on commit 812bb87

Please sign in to comment.