Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to config the accessControl for user roles #16

Open
piyalcodes opened this issue Jun 20, 2019 · 2 comments
Open

Unable to config the accessControl for user roles #16

piyalcodes opened this issue Jun 20, 2019 · 2 comments

Comments

@piyalcodes
Copy link

I have recently installed this package and I want to hide most of features for all the user roles.

This is how my ckfinder.php accessControl looks like in the config folder

$config['accessControl'][] = array(
'role' => '',
'resourceType' => '
',
'folder' => '/',
'FOLDER_VIEW' => false,
'FOLDER_CREATE' => false,
'FOLDER_RENAME' => false,
'FOLDER_DELETE' => false,
'FILE_VIEW' => false,
'FILE_UPLOAD' => false,
'FILE_RENAME' => false,
'FILE_DELETE' => false,
'IMAGE_RESIZE' => false,
'IMAGE_RESIZE_CUSTOM' => false
);

and this is how my public/js/ckfinder/config.js looks like

-- START ---
var config = {}; // Set your configuration options below. // Examples: // config.language = 'pl'; // config.skin = 'jquery-mobile'; CKFinder.define( config );
-- END --

Issue:
When I open the CKfinder from CKeditor, still I see buttons like "Upload", "New Subfolder" and based on the above configuration on the PHP they should be hidden for all the user roles.

Could you please investigate and provide a solution for this issue?

@zaak
Copy link
Member

zaak commented Jun 20, 2019

Hi @piyalcodes. Try using a * wildcard in role and resourceType:

$config['accessControl'][] = array(
    'role'                => '*', // ←
    'resourceType'        => '*', // ←
    'folder'              => '/',

    'FOLDER_VIEW'         => false,
    'FOLDER_CREATE'       => false,
    'FOLDER_RENAME'       => false,
    'FOLDER_DELETE'       => false,
    'FILE_VIEW'           => false,
    'FILE_UPLOAD'         => false,
    'FILE_RENAME'         => false,
    'FILE_DELETE'         => false,
    'IMAGE_RESIZE'        => false,
    'IMAGE_RESIZE_CUSTOM' => false
);

@piyalcodes
Copy link
Author

Hi @zaak, I think when I add the code to github comment, the character "*" is gone from my content. that is why it says just ''. Anyway It is already there in my code. What could be the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants