permission
This commit is contained in:
@@ -86,7 +86,7 @@ UNFOLD = {
|
||||
|
||||
"SIDEBAR": {
|
||||
"show_search": False,
|
||||
"show_all_applications": True,
|
||||
"show_all_applications": False,
|
||||
"navigation": [
|
||||
{
|
||||
|
||||
@@ -147,6 +147,7 @@ UNFOLD = {
|
||||
"title": _("کد تخفیف"),
|
||||
"icon": "payments",
|
||||
"link": reverse_lazy("admin:order_discountcode_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
|
||||
],
|
||||
@@ -163,16 +164,19 @@ UNFOLD = {
|
||||
"title": _("دسته بندی"),
|
||||
"icon": "category",
|
||||
"link": reverse_lazy("admin:product_maincategorymodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
{
|
||||
"title": _("زیر دسته بندی"),
|
||||
"icon": "category",
|
||||
"link": reverse_lazy("admin:product_subcategorymodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
{
|
||||
"title": _("دسته بندی پورسانتی"),
|
||||
"icon": "devices",
|
||||
"link": reverse_lazy("admin:home_showcaseslider_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -186,17 +190,20 @@ UNFOLD = {
|
||||
"title": _("اسلاید ها"),
|
||||
"icon": "slide_library",
|
||||
"link": reverse_lazy("admin:home_slidermodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
{
|
||||
"title": _("عکس مقایسه"),
|
||||
"icon": "compare",
|
||||
"link": reverse_lazy("admin:home_homeimagemodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
}
|
||||
,
|
||||
{
|
||||
"title": _("مقالات و بلاگ ها"),
|
||||
"icon": "newsmode",
|
||||
"link": reverse_lazy("admin:blog_blogmodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
|
||||
|
||||
@@ -217,6 +224,7 @@ UNFOLD = {
|
||||
"title": _("چت محصول"),
|
||||
"icon": "chat",
|
||||
"link": reverse_lazy("admin:chat_productchatmodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
{
|
||||
"title": _("ادرس ها"),
|
||||
@@ -227,18 +235,21 @@ UNFOLD = {
|
||||
"title": _("تلاشهای نفوذ"),
|
||||
"icon": "gpp_maybe",
|
||||
"link": reverse_lazy("admin:account_securitybreachattemptmodel_changelist"),
|
||||
"badge": 'utils.admin.new_attck_count'
|
||||
"badge": 'utils.admin.new_attck_count',
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
},
|
||||
{
|
||||
"title": _("اخبار"),
|
||||
"icon": "newspaper",
|
||||
"link": reverse_lazy("admin:account_newsmodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
|
||||
},
|
||||
{
|
||||
"title": _("اطلاعیه ها"),
|
||||
"icon": "notifications",
|
||||
"link": reverse_lazy("admin:account_usernotificationmodel_changelist"),
|
||||
"permission": lambda request: request.user.is_superuser,
|
||||
|
||||
},
|
||||
|
||||
@@ -295,47 +306,47 @@ UNFOLD = {
|
||||
|
||||
],
|
||||
},
|
||||
{
|
||||
"title": _("تسک های سلری"),
|
||||
"collapsible": True,
|
||||
"items": [
|
||||
{
|
||||
"title": _("Clocked"),
|
||||
"icon": "hourglass_bottom",
|
||||
"link": reverse_lazy(
|
||||
"admin:django_celery_beat_clockedschedule_changelist"
|
||||
),
|
||||
},
|
||||
{
|
||||
"title": _("Crontabs"),
|
||||
"icon": "update",
|
||||
"link": reverse_lazy(
|
||||
"admin:django_celery_beat_crontabschedule_changelist"
|
||||
),
|
||||
},
|
||||
{
|
||||
"title": _("Intervals"),
|
||||
"icon": "arrow_range",
|
||||
"link": reverse_lazy(
|
||||
"admin:django_celery_beat_intervalschedule_changelist"
|
||||
),
|
||||
},
|
||||
{
|
||||
"title": _("Periodic tasks"),
|
||||
"icon": "task",
|
||||
"link": reverse_lazy(
|
||||
"admin:django_celery_beat_periodictask_changelist"
|
||||
),
|
||||
},
|
||||
{
|
||||
"title": _("Solar events"),
|
||||
"icon": "event",
|
||||
"link": reverse_lazy(
|
||||
"admin:django_celery_beat_solarschedule_changelist"
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
# {
|
||||
# "title": _("تسک های سلری"),
|
||||
# "collapsible": True,
|
||||
# "items": [
|
||||
# {
|
||||
# "title": _("Clocked"),
|
||||
# "icon": "hourglass_bottom",
|
||||
# "link": reverse_lazy(
|
||||
# "admin:django_celery_beat_clockedschedule_changelist"
|
||||
# ),
|
||||
# },
|
||||
# {
|
||||
# "title": _("Crontabs"),
|
||||
# "icon": "update",
|
||||
# "link": reverse_lazy(
|
||||
# "admin:django_celery_beat_crontabschedule_changelist"
|
||||
# ),
|
||||
# },
|
||||
# {
|
||||
# "title": _("Intervals"),
|
||||
# "icon": "arrow_range",
|
||||
# "link": reverse_lazy(
|
||||
# "admin:django_celery_beat_intervalschedule_changelist"
|
||||
# ),
|
||||
# },
|
||||
# {
|
||||
# "title": _("Periodic tasks"),
|
||||
# "icon": "task",
|
||||
# "link": reverse_lazy(
|
||||
# "admin:django_celery_beat_periodictask_changelist"
|
||||
# ),
|
||||
# },
|
||||
# {
|
||||
# "title": _("Solar events"),
|
||||
# "icon": "event",
|
||||
# "link": reverse_lazy(
|
||||
# "admin:django_celery_beat_solarschedule_changelist"
|
||||
# ),
|
||||
# },
|
||||
# ],
|
||||
# },
|
||||
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user