Skip to content

Commit

Permalink
Removing Resources nav item from CP
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmartens committed Jan 14, 2025
1 parent e048e2e commit 2005e30
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions packages/plugin/src/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class Calendar extends Plugin
public const VIEW_DAY = 'day';
public const VIEW_EVENTS = 'events';
public const VIEW_CALENDARS = 'calendars';
public const VIEW_RESOURCES = 'resources';

public const PERMISSION_CALENDARS = 'calendar-manageCalendars';
public const PERMISSION_CREATE_CALENDARS = 'calendar-createCalendars';
Expand All @@ -82,7 +81,6 @@ class Calendar extends Plugin
public const PERMISSION_EVENTS_FOR = 'calendar-manageEventsFor';
public const PERMISSION_EVENTS_FOR_ALL = 'calendar-manageEventsFor:all';
public const PERMISSION_SETTINGS = 'calendar-settings';
public const PERMISSION_RESOURCES = 'calendar-resources';

public const PERMISSIONS_HELP_LINK = 'https://docs.solspace.com/craft/calendar/v4/configuration/demo-templates/';

Expand Down Expand Up @@ -389,7 +387,6 @@ function (RegisterUserPermissionsEvent $event) {
'nested' => $editEventsPermissions,
],
self::PERMISSION_SETTINGS => ['label' => self::t('Access Settings')],
self::PERMISSION_RESOURCES => ['label' => self::t('Access Resources')],
];

$event->permissions[] = [
Expand Down
5 changes: 0 additions & 5 deletions packages/plugin/src/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,4 @@
'calendar/settings/guest-access' => 'calendar/settings/guest-access',
'calendar/settings/ics' => 'calendar/settings/ics',
'calendar/settings/demo-templates' => 'calendar/codepack/list-contents',
// Resources
'calendar/resources' => 'calendar/resources/index',
'calendar/resources/community' => 'calendar/resources/community',
'calendar/resources/explore' => 'calendar/resources/explore',
'calendar/resources/support' => 'calendar/resources/support',
];
4 changes: 0 additions & 4 deletions packages/plugin/src/subnav.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@
];
}

if (PermissionHelper::checkPermission(Calendar::PERMISSION_RESOURCES)) {
$subnav['resources'] = ['label' => Calendar::t('Resources'), 'url' => 'calendar/resources'];
}

return $subnav;

0 comments on commit 2005e30

Please sign in to comment.