code/Forms/AssetFormFactory.php
protected function getFormFieldSecurityTab($record, $context = [])
    {
        // Get permissions
        $viewersOptionsField = [
            'Inherit' => _t(__CLASS__.'.INHERIT', 'Inherit from parent folder'),
            'Anyone' => _t(__CLASS__.'.ANYONE', 'Anyone'),
            'LoggedInUsers' => _t(__CLASS__.'.LOGGED_IN', 'Logged-in users'),
            'OnlyTheseUsers' => _t(__CLASS__.'.ONLY_GROUPS', 'Only these groups (choose from list)')
        ];

        // No "Anyone" editors option
        $editorsOptionsField = $viewersOptionsField;
        unset($editorsOptionsField['Anyone']);

        return Tab::create(
            'Permissions',
            OptionsetField::create(
                'CanViewType',
                _t(__CLASS__.'.ACCESSHEADER', 'Who can view this file?')
            )
                ->setSource($viewersOptionsField),
            TreeMultiselectField::create(
                'ViewerGroups',
                _t(__CLASS__.'.VIEWERGROUPS', 'Viewer Groups')
            ),
            OptionsetField::create(
                "CanEditType",
                _t(__CLASS__.'.EDITHEADER', 'Who can edit this file?')
            )
                ->setSource($editorsOptionsField),
            TreeMultiselectField::create(
                'EditorGroups',
                _t(__CLASS__.'.EDITORGROUPS', 'Editor Groups')
            )
        );
    }
protected function getFormFieldSecurityTab($record, $context = [])
    {
        // Get permissions
        $viewersOptionsField = [
            'Inherit' => _t(__CLASS__.'.INHERIT', 'Inherit from parent folder'),
            'Anyone' => _t(__CLASS__.'.ANYONE', 'Anyone'),
            'LoggedInUsers' => _t(__CLASS__.'.LOGGED_IN', 'Logged-in users'),
            'OnlyTheseUsers' => _t(__CLASS__.'.ONLY_GROUPS', 'Only these groups (choose from list)')
        ];

        // No "Anyone" editors option
        $editorsOptionsField = $viewersOptionsField;
        unset($editorsOptionsField['Anyone']);

        return Tab::create(
            'Permissions',
            OptionsetField::create(
                'CanViewType',
                _t(__CLASS__.'.ACCESSHEADER', 'Who can view this file?')
            )
                ->setSource($viewersOptionsField),
            TreeMultiselectField::create(
                'ViewerGroups',
                _t(__CLASS__.'.VIEWERGROUPS', 'Viewer Groups')
            ),
            OptionsetField::create(
                "CanEditType",
                _t(__CLASS__.'.EDITHEADER', 'Who can edit this file?')
            )
                ->setSource($editorsOptionsField),
            TreeMultiselectField::create(
                'EditorGroups',
                _t(__CLASS__.'.EDITORGROUPS', 'Editor Groups')
            )
        );
    }
protected function getFormFieldSecurityTab ( $ record , $ context = [ ] ) { // Get permissions $ viewersOptionsField = [ 'Inherit' => _t ( __CLASS__ . '.INHERIT' , 'Inherit from parent folder' ) , 'Anyone' => _t ( __CLASS__ . '.ANYONE' , 'Anyone' ) , 'LoggedInUsers' => _t ( __CLASS__ . '.LOGGED_IN' , 'Logged-in users' ) , 'OnlyTheseUsers' => _t ( __CLASS__ . '.ONLY_GROUPS' , 'Only these groups (choose from list)' ) ] ; // No "Anyone" editors option $ editorsOptionsField = $ viewersOptionsField ; unset ( $ editorsOptionsField [ 'Anyone' ] ) ; return Tab :: create ( 'Permissions' , OptionsetField :: create ( 'CanViewType' , _t ( __CLASS__ . '.ACCESSHEADER' , 'Who can view this file?' ) ) -> setSource ( $ viewersOptionsField ) , TreeMultiselectField :: create ( 'ViewerGroups' , _t ( __CLASS__ . '.VIEWERGROUPS' , 'Viewer Groups' ) ) , OptionsetField :: create ( "CanEditType" , _t ( __CLASS__ . '.EDITHEADER' , 'Who can edit this file?' ) ) -> setSource ( $ editorsOptionsField ) , TreeMultiselectField :: create ( 'EditorGroups' , _t ( __CLASS__ . '.EDITORGROUPS' , 'Editor Groups' ) ) ) ; }
Build security tab

@param File $record
@param array $context
@return Tab
Build security tab