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

Feature Request: CKEditor plugin user group permission to enable source editing #305

Open
svale opened this issue Oct 18, 2024 · 2 comments
Assignees
Labels

Comments

@svale
Copy link

svale commented Oct 18, 2024

Description

I would be super nice if we could combine enableSourceEditingForNonAdmins with a specific user group permission. For larger clients, we often have a Super User group that should have wider permissions than other editor groups, and specifically the privilege to see/edit a CKEditor field source.

I imaging this as plugin user group permission option:
Image

In combination with an extended test before removing the button

if (!$this->enableSourceEditingForNonAdmins && !($Craft::$app->getUser()->checkPermission("ckEditor:viewSourceEditingButton") || Craft::$app->getUser()->getIsAdmin())) {
    ArrayHelper::removeValue($toolbar, 'sourceEditing');
}

(Hope you'll forgive me for adding a feature request as bug/issue since its the only option )

Thanks!

Additional info (N/A)

  • Craft version: 5.4.8
  • PHP version: 8.2
  • Plugins & versions:
    CKEditor 4.2.0
@i-just
Copy link
Contributor

i-just commented Nov 28, 2024

Hi, thanks for the suggestion! I just raised a PR that adds a new setting to the CKEditor type field. Further details can be found in the PR.

@i-just i-just self-assigned this Nov 28, 2024
@svale
Copy link
Author

svale commented Dec 2, 2024

Thank you 😄 !

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

No branches or pull requests

2 participants