SilverStripe\Admin\SecurityAdmin
Security section of the CMS
Synopsis
class SecurityAdmin
extends LeftAndMain
implements
PermissionProvider
{
- // Inherited constants from LeftAndMain
- const SCHEMA_HEADER = 'X-Formschema-Request';
- // members
- private static string $url_segment = 'security';
- private static string $url_rule = '/$Action/$ID/$OtherID';
- private static string $menu_title = 'Security';
- private static $tree_class = Group::class;
- private static $subitem_class = Member::class;
- private static string $required_permission_codes = 'CMS_ACCESS_SecurityAdmin';
- private static string $menu_icon_class = 'font-icon-torsos-all';
- private static array $allowed_actions = ;
- // Inherited members from LeftAndMain
- protected FormSchema $schema;
- protected $pageID;
- protected PjaxResponseNegotiator $responseNegotiator;
- protected VersionProvider $versionProvider;
- protected LeftAndMain_SearchFilter $searchFilterCache;
- // methods
- public HTTPResponse users()
- public HTTPResponse groups()
- public HTTPResponse roles()
- public void getEditForm()
- public void memberimport()
- public Form MemberImportForm()
- public void groupimport()
- public Form GroupImportForm()
- public void Backlink()
- public void Breadcrumbs()
- public void providePermissions()
- // Inherited methods from LeftAndMain
- public string getCombinedClientConfig()
- public array getClientConfig()
- public FormSchema getFormSchema()
- public $this setFormSchema()
- public HTTPResponse schema()
- public HTTPResponse jsonError()
- public HTTPResponse methodSchema()
- protected bool getSchemaRequested()
- protected HTTPResponse getSchemaResponse()
- public bool canView()
- public static array|string|bool getRequiredPermissions()
- protected void init()
- public void handleRequest()
- public HTTPResponse|string redirect()
- public HTTPResponse index()
- public bool ShowSwitchView()
- public string Link()
- public static void menu_title_for_class()
- public static string menu_title()
- public static string menu_icon_for_class()
- public static string menu_icon_class_for_class()
- public HTTPResponse show()
- public PjaxResponseNegotiator getResponseNegotiator()
- public SS_List MainMenu()
- public void Menu()
- public ArrayData MenuCurrentItem()
- public string|array getTemplatesWithSuffix()
- public void Content()
- public DBHTMLText PreviewPanel()
- public DataObject getRecord()
- public ArrayList Breadcrumbs()
- protected LeftAndMain_SearchFilter getSearchFilter()
- public HTTPResponse save()
- public DataObject getNewItem()
- public void delete()
- public Form EditForm()
- public Form getEditForm()
- public Form EmptyForm()
- public ModalController Modals()
- public string Tools()
- public string EditFormTools()
- public void batchactions()
- public Form BatchActionsForm()
- public void printable()
- public DBHTMLText getSilverStripeNavigator()
- public int currentPageID()
- public void setCurrentPageID()
- public DataObject currentPage()
- public bool isCurrentPage()
- protected string sessionNamespace()
- public string|bool LinkPreview()
- public string CMSVersion()
- public string CMSVersionNumber()
- public array SwitchView()
- public SiteConfig SiteConfig()
- public ArrayList getHelpLinks()
- public string ApplicationLink()
- public string getApplicationName()
- public string Title()
- public string SectionTitle()
- public string LogoutURL()
- public string BaseCSSClasses()
- public string Locale()
- public void providePermissions()
- public $this setVersionProvider()
- public VersionProvider getVersionProvider()
Hierarchy
Tasks
Line | Task |
---|---|
964 | Necessary for TableListField URLs to work properly |
1117+ | Wrap in CMSMenu instance accessor |
Constants
Name | Value |
---|---|
SCHEMA_HEADER | 'X-Formschema-Request' |
Members
private
- $allowed_actions
- $required_permission_codes
- $subitem_class
- $tree_class
- $url_rule
- $url_segment
protected
- $pageID
—
null
Current pageID for this request - $responseNegotiator — SilverStripe\Control\PjaxResponseNegotiator
- $schema
—
SilverStripe\Forms\Schema\FormSchema
Current form schema helper - $searchFilterCache
—
SilverStripe\Admin\LeftAndMain_SearchFilter
Cached search filter instance for current search - $versionProvider — SilverStripe\Core\Manifest\VersionProvider
Methods
public
- Backlink() — Disable GridFieldDetailForm backlinks for this view, as its
- Breadcrumbs()
- GroupImportForm()
- MemberImportForm()
- getEditForm()
- groupimport()
- groups() — Shortcut action for setting the correct active tab.
- memberimport()
- providePermissions()
- roles() — Shortcut action for setting the correct active tab.
- users() — Shortcut action for setting the correct active tab.
Inherited from SilverStripe\Admin\LeftAndMain
protected
- getSchemaRequested() — Check if the current request has a X-Formschema-Request header set.
- getSchemaResponse() — Generate schema for the given form based on the X-Formschema-Request header value
- getSearchFilter() — Gets the current search filter for this request, if available
- init()
- sessionNamespace()
public
- ApplicationLink()
- BaseCSSClasses() — Same as {@link ViewableData->CSSClasses()}, but with a changed name to avoid problems when using {@link ViewableData->customise()} (which always returns "ArrayData" from the $original object).
- BatchActionsForm()
- Breadcrumbs()
- CMSVersion() — Return the version number of this application, ie. 'CMS: 4.2.1'
- CMSVersionNumber() — Return the version number of the CMS in the 'major.minor' format, e.g. '4.2' Will handle 4.10.x-dev by removing .x-dev
- Content()
- EditForm() — Retrieves an edit form, either for display, or to process submitted data.
- EditFormTools() — Renders a panel containing tools which apply to the currently displayed edit form.
- EmptyForm() — Returns a placeholder form, used by {@link getEditForm()} if no record is selected.
- Link() — You should implement a Link() function in your subclass of LeftAndMain, to point to the URL of that particular controller.
- LinkPreview() — URL to a previewable record which is shown through this controller.
- Locale()
- LogoutURL() — Generate a logout url with BackURL to the CMS
- MainMenu() — Returns the main menu of the CMS. This is also used by init() to work out which sections the user has access to.
- Menu()
- MenuCurrentItem()
- Modals() — Handler for all global modals
- PreviewPanel() — Render $PreviewPanel content
- SectionTitle() — Return the title of the current section. Either this is pulled from the current panel's menu_title or from the first active menu
- ShowSwitchView() — If this is set to true, the "switchView" context in the template is shown, with links to the staging and publish site.
- SiteConfig()
- SwitchView()
- Title()
- Tools() — Renders a panel containing tools which apply to all displayed "content" (mostly through {@link EditForm()}), for example a tree navigation or a filter panel.
- batchactions() — Batch Actions Handler
- canView()
- currentPage() — Uses {@link getRecord()} and {@link currentPageID()} to get the currently selected record.
- currentPageID() — Identifier for the currently shown record, in most cases a database ID. Inspects the following sources (in this order): - GET/POST parameter named 'ID' - URL parameter named 'ID' - Session value namespaced by classname, e.g. "CMSMain.currentPage"
- delete()
- getApplicationName() — Get the application name.
- getClientConfig() — Returns configuration required by the client app.
- getCombinedClientConfig() — Gets the combined configuration of all LeftAndMain subclasses required by the client app.
- getEditForm() — Calls {@link SiteTree->getCMSFields()} by default to determine the form fields to display.
- getFormSchema() — Get form schema helper
- getHelpLinks() — Returns help_links in a format readable by a template
- getNewItem() — Create new item.
- getRecord() — Get dataobject from the current ID
- getRequiredPermissions() — Get list of required permissions
- getResponseNegotiator() — Caution: Volatile API.
- getTemplatesWithSuffix() — Return appropriate template(s) for this class, with the given suffix using {@link SSViewer::get_templates_by_class()}
- getVersionProvider() — Get the SilverStripe version provider
- handleRequest()
- index()
- isCurrentPage() — Compares a given record to the currently selected one (if any).
- jsonError() — Return an error HTTPResponse encoded as json
- methodSchema()
- printable()
- providePermissions()
- redirect() — Overloaded redirection logic to trigger a fake redirect on ajax requests.
- save() — Save handler
- schema() — Gets a JSON schema representing the current edit form.
- setCurrentPageID() — Forces the current page to be set in session, which can be retrieved later through {@link currentPageID()}.
- setFormSchema() — Set form schema helper for this controller
- setVersionProvider() — Set the SilverStripe version provider to use
- show()