Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronbushnell/craft-cpusergroup
Control Panel User Group plugin for Craft CMS
https://github.com/aaronbushnell/craft-cpusergroup
Last synced: about 1 month ago
JSON representation
Control Panel User Group plugin for Craft CMS
- Host: GitHub
- URL: https://github.com/aaronbushnell/craft-cpusergroup
- Owner: aaronbushnell
- Created: 2016-02-19T22:09:40.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-19T22:11:15.000Z (almost 9 years ago)
- Last Synced: 2024-04-15T01:24:09.723Z (8 months ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Control Panel User Group plugin for Craft CMS
======================================_Add user group classes to the CP's `` tag._
## Usage
So simple to use... just install it!
The plugin will automatically add classes to the `` tag in the control panel. You can use CSS or JS, along with these classes, to target DOM elements and manipulate the page.
## What It Does
Classes will automatically be applied to the `` tag. User group _handles_ are used to generate the classes. This only affects the control panel... your front-end pages will be unaffected.
For the every page in the control panel, classes will be applied based on the user group(s) of **the currently logged-in user**.
For the Account/Profile page of the control panel, classes will be applied based on the user group(s) of **the profile being viewed**.
If the currently logged-in user (or the profile being viewed) is a member of multiple user groups, then each class will be applied individually.
## Why?
Because there are a million things that you may want to do in your control panel, and many of them need to affect **only certain groups**. This plugin is designed to pair perfectly with [Control Panel CSS](https://github.com/lindseydiloreto/craft-cpcss) and/or [Control Panel JS](https://github.com/lindseydiloreto/craft-cpjs). (You can include CSS/JS in your own plugin as well!)
## Common Uses
With some supplementary help from CSS or JS, you can:
- Show, hide, or manipulate entry fields for certain groups.
- Show, hide, or manipulate any other control panel elements.
- Provide completely different CSS for different groups.
- ... and just about anything else you can envision!***
## Disclaimer
It's important to note that showing/hiding fields via CSS/JS is **purely cosmetic**. Those fields may remain accessible to a savvy user, so don't rely on this plugin to guarantee access/denial of any DOM elements. **We accept no liability for any security issues arising from the use of this plugin.**