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 · 0 comments
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
@svale svale added the bug label Oct 18, 2024
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

1 participant