Access CMS user roles on client side


We have a requirement wherein users with certain roles shouldn’t be allowed to edit rich text editor content and we are thinking of using Class Editor (CKEDITOR.editor) - CKEditor 4 API docs to change the editor into read-only mode for these users.

Now, we need a way to get the current logged-in CMS user roles - are there any OOTB REST endpoint available to get user details ? Alternatively, are there any OOTB client-side libraries which could provide this ?

Thank you!


AFAIK there is no such endpoint. What you might try is overriding the CKEditorNodePlugin. In the part about adding a panel it mentions this. You don’t want to add a panel, but adjust the behavior of ckeditor. I haven’t tried any of this, but it is a place to start.