1 (edited by mikeh 2011-12-15 23:07:53)

Topic: 'Multi User 1.4' Plugin

Multi User plugin
Click Here To Download From Extend
View GitHub Repos.

It has the following functionality:

Edit User:
You are able to edit all the options for each user, including permissions.

Add User:
You are able to add a new user and set permissions

Permissions:
You can block certain features and areas for each individual user.
This includes removing the items from the navigation, as well as blocking access to the area/item if the user tries to access it directly.

The Following Areas Can Be Blocked Using The Permissions:

  • Pages

  • Files

  • Theme

  • Plugins

  • Backups

  • Settings

  • Support

  • Edit

Screenshots Below:

User Management Screen:
http://simpsonsepisodes.com/plugins/multi-user/user-managment.png


Edit User:
http://simpsonsepisodes.com/plugins/multi-user/edit-user.png


Add User:
http://simpsonsepisodes.com/plugins/multi-user/add-user.png


Features That Will Be Added:

  • Ability To Delete Users

  • User Profile Screens: Where each user can put a description about them, picture, etc..
          User will also have the ability to put their profile page live.

Changes & Versions:
Version 1.1 (4/11/2011)
- Links in Admin Panel footer will now be hidden based on permissions set
- Added 'Disable Admin Access' Checkbox:
    - If Checked, the user will not be able to manage users or access the 'user management' screen.
- Added 'Custom Landing Page' dropdown:
    - The ability to select an alternate landing page the user will land on after login (useful if 'pages' is disabled)
- Language files installed will automatically show up in the 'Language' dropdown
- Cleaned up jquery using Chris's suggestion
Important Change To Note:
I have rearranged the xml file (Taking Chris's Suggestion) by putting all of the permissions in <permissions></permissions>
This means that if you have already used the multi user plugin, and you installed version 1.1, you will need to reset the permissions by editing the users.

Version 1.4 (12/15/2011)
- Fixed "Manage User" Form In All Versions Of IE - Previously clicking the "Edit" link for a user crashed IE
- Fixed Occasional Error That Occurred When Resetting Password From Front End
- Re-Coded Entire Plugin For Easier Future Updating & Community Collaboration
- Added "Update This Plugin" Button Which Will Update The Plugin To The Newest Version In Extend
- Fixed Problem With Settings Page
      Previously changing the password from the settings page would overwrite permissions.
      Click Here To Learn More About This Fix
- Various Other Changes And Improvements

This is my first plugin so let me know if anyone catches any bugs or mistakes.

Re: 'Multi User 1.4' Plugin

Hey Mike,

Great job on the plugin...

There is a problem with the user-managment-add.php register plugin function, your missing the "author URL"
which is preventing new user being created.

Otherwise works a treat.....

Currently working on The Matrix Plugin...

Re: 'Multi User 1.4' Plugin

great-great plugin!

I try it and when I created one user and save settings, the page has been empty, have not loaded any section..
Also, in the user settings, don't show the default language that I have configured in GS (Spanish).

repeat: great plugin!

Re: 'Multi User 1.4' Plugin

n00dles101 wrote:

Hey Mike,

Great job on the plugin...

There is a problem with the user-managment-add.php register plugin function, your missing the "author URL"
which is preventing new user being created.

Otherwise works a treat.....

Thanks for the heads up.

I added the url and re-uploaded it to extend & this post.

Re: 'Multi User 1.4' Plugin

singulae wrote:

great-great plugin!

I try it and when I created one user and save settings, the page has been empty, have not loaded any section..
Also, in the user settings, don't show the default language that I have configured in GS (Spanish).

repeat: great plugin!

I am aware of the language issue.

I do not know what function I can use to automatically populate the language select box with the languages a user has installed. If anyone can help me out with that it would be appreciated.

Re: 'Multi User 1.4' Plugin

Wow mike. Great looking plugin. I'll give it a test drive tomorrow sometime.

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

7 (edited by Angryboy 2011-04-10 02:43:30)

Re: 'Multi User 1.4' Plugin

Works perfectly as promised and will be really benefitial for GS users with larger sites :)

Here are where some 'snags' may come in (depending on what a client might expect):

  • If the 'Pages' page is disabled, a user basically can't access the back end (because this is the page they are directed to upon logging in). Now this may seem redundant because disabling that page for users may be a singular occurance, but if someone is tasked as the Web Developer or Web Designer but the client doesn't want that person to access/change what is on the pages? It would make sense in that instance is they could be redirected to the next tab available (either Files or Theme), but you could argue that it would be a mugs game to disable the 'Pages' page. So perhaps make an option for a 'Starting Page' redirection in the absense of access to the 'Pages' tab.

  • For plugin developers like juliancc who've made their own tabs for specific plugins (like the GSGallery), there isn't a way to disable access to those tabs. Might be desireable to find a way around this.

  • This is probably the biggest snag, and it is that the right side panel for links is gone for added users. So if you had someone registered as a Journalist for example, they can't actually access the 'Create New Page' page or any News plugin to be able to start producing content - they can only edit what is already there.

Otherwise, what you have at the moment works and it isn't a case of things bugging out - simply refining your plugin's functionality to the best it can achieve :) Awesome stuff indeed *two thumbs up*

Tutorials: I18N News 3, I18N Blog *new!*

Re: 'Multi User 1.4' Plugin

Fantastic news! This feature will open up many new applications.

mikeh wrote:

I added the url and re-uploaded it to extend & this post.

Just one request: please use a different version number, even for the smallest of changes, otherwise it will come back to bite someone, sooner or later. I'd suggest only having one download point, too (Extend section, rather than this thread).

--
Nick.

Re: 'Multi User 1.4' Plugin

Angryboy wrote:

Works perfectly as promised and will be really benefitial for GS users with larger sites :)

Here are where some 'snags' may come in (depending on what a client might expect):

  • If the 'Pages' page is disabled, a user basically can't access the back end (because this is the page they are directed to upon logging in). Now this may seem redundant because disabling that page for users may be a singular occurance, but if someone is tasked as the Web Developer or Web Designer but the client doesn't want that person to access/change what is on the pages? It would make sense in that instance is they could be redirected to the next tab available (either Files or Theme), but you could argue that it would be a mugs game to disable the 'Pages' page. So perhaps make an option for a 'Starting Page' redirection in the absense of access to the 'Pages' tab.

  • For plugin developers like juliancc who've made their own tabs for specific plugins (like the GSGallery), there isn't a way to disable access to those tabs. Might be desireable to find a way around this.

  • This is probably the biggest snag, and it is that the right side panel for links is gone for added users. So if you had someone registered as a Journalist for example, they can't actually access the 'Create New Page' page or any News plugin to be able to start producing content - they can only edit what is already there.

Otherwise, what you have at the moment works and it isn't a case of things bugging out - simply refining your plugin's functionality to the best it can achieve :) Awesome stuff indeed *two thumbs up*

Appreciate the feedback..

I will definitely add the ability to set an alternate starting page, and look into your other suggestions

Re: 'Multi User 1.4' Plugin

mikeh,

this is a fantastic addition to GS, you rock! I personally don't have any immediate use for it, but, as others said, this'll open up new great possibilities.

Keep up the good work, mate!

Re: 'Multi User 1.4' Plugin

Wow, i must say Mike - this is a great job. A few things that I noticed:

1. you hide the top nav links, but the bottom footer links do not hide. I am thinking of adding a class to each one as I have for the top nav links so when you hide ".theme" you hide both. However, this obviously wont be until 3.1 gets released.

2. if you do not have "all" the permissions, you shouldn't be allowed to edit your own permissions. i am assuming that if you have all permissions - you are an administrator.

3. i think to make the user.xml file cleaner - you should make the format like this:

$xml = new SimpleXMLElement('<item></item>');
    $xml->addChild('USR', $NUSR);
    $xml->addChild('PWD', $NPASSWD);
    $xml->addChild('EMAIL', $NEMAIL );
    $xml->addChild('HTMLEDITOR', $NHTMLEDITOR);
    $xml->addChild('TIMEZONE', $NTIMEZONE);
    $xml->addChild('LANG', $NLANG);
    $perm = $xml->addChild('PERMISSIONS');
    $perm->addChild('PAGES', $NPAGES);
    $perm->addChild('FILES', $NFILES);
    $perm->addChild('THEME', $NTHEME);
    $perm->addChild('PLUGINS', $NPLUGINS);
    $perm->addChild('BACKUPS', $NBACKUPS);
    $perm->addChild('SETTINGS', $NSETTINGS);
    $perm->addChild('SUPPORT', $NSUPPORT);
    $perm->addChild('EDIT', $NEDIT);

4. Why didnt you reuse the timezone <select> code from settings.php? Check out Line 222 in settings.php
5. To read the system's available languages, you can rip the code from settings.php as well: Line 153
6. .show("slow") and .hide("slow") make the page look sluggish when it really isnt. i would personally prefer just to use the default speed or change it to .slideDown() and .slideUp() respectively


overall - very very nice plugin Mike. I also think that you should add some type of disclaimer within the Extend section explaining that permissions only "hide functionality" not actually "disable functionality" from the end user.

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: 'Multi User 1.4' Plugin

after adding a user attempts to log me appears

You Do Not Have Permissions To Access This Page

Re: 'Multi User 1.4' Plugin

Simple - great plugin. I'm sure will be one of the most used. Great thank you!

Oleg, you may have checked the wrong checkbox - "pages" for example.

14 (edited by Oleg06 2011-04-10 12:12:32)

Re: 'Multi User 1.4' Plugin

Yes, the plugin is very useful, thanks.
and the language file will be?

15 (edited by mikeh 2011-04-10 18:32:03)

Re: 'Multi User 1.4' Plugin

ccagle8 wrote:

Wow, i must say Mike - this is a great job. A few things that I noticed:

1. you hide the top nav links, but the bottom footer links do not hide. I am thinking of adding a class to each one as I have for the top nav links so when you hide ".theme" you hide both. However, this obviously wont be until 3.1 gets released.

2. if you do not have "all" the permissions, you shouldn't be allowed to edit your own permissions. i am assuming that if you have all permissions - you are an administrator.

3. i think to make the user.xml file cleaner - you should make the format like this:

$xml = new SimpleXMLElement('<item></item>');
    $xml->addChild('USR', $NUSR);
    $xml->addChild('PWD', $NPASSWD);
    $xml->addChild('EMAIL', $NEMAIL );
    $xml->addChild('HTMLEDITOR', $NHTMLEDITOR);
    $xml->addChild('TIMEZONE', $NTIMEZONE);
    $xml->addChild('LANG', $NLANG);
    $perm = $xml->addChild('PERMISSIONS');
    $perm->addChild('PAGES', $NPAGES);
    $perm->addChild('FILES', $NFILES);
    $perm->addChild('THEME', $NTHEME);
    $perm->addChild('PLUGINS', $NPLUGINS);
    $perm->addChild('BACKUPS', $NBACKUPS);
    $perm->addChild('SETTINGS', $NSETTINGS);
    $perm->addChild('SUPPORT', $NSUPPORT);
    $perm->addChild('EDIT', $NEDIT);

4. Why didnt you reuse the timezone <select> code from settings.php? Check out Line 222 in settings.php
5. To read the system's available languages, you can rip the code from settings.php as well: Line 153
6. .show("slow") and .hide("slow") make the page look sluggish when it really isnt. i would personally prefer just to use the default speed or change it to .slideDown() and .slideUp() respectively


overall - very very nice plugin Mike. I also think that you should add some type of disclaimer within the Extend section explaining that permissions only "hide functionality" not actually "disable functionality" from the end user.

Hello Chris,

Thanks for the feedback.

One thing I want to note is that permissions hide the functionality and kill the page if they try to access it directly. They do not only remove the menu items.

I will definitely make the changes you mentioned in #2,3,4,5,6. I will try and use jQuery to hide the bottom links as well.

16 (edited by mikeh 2011-04-10 12:42:33)

Re: 'Multi User 1.4' Plugin

Oleg06 wrote:

after adding a user attempts to log me appears

You Do Not Have Permissions To Access This Page

It looks like you disabled the 'pages' page for the user you created.

This will block them from accessing the page, I should have the ability to choose an alternate starting page complete this evening.

I will also add the language files this evening.

Re: 'Multi User 1.4' Plugin

Yes, I already knew, and I welcome the development of language files

Re: 'Multi User 1.4' Plugin

Blocking access to 'Theme' is never saved because of a typo in user-managment.php, line 77:

--- if (isset($_POST['Theme']) && $_POST['Files'] == 'no') {
+++ if (isset($_POST['Theme']) && $_POST['Theme'] == 'no') {
--
Nick.

Re: 'Multi User 1.4' Plugin

I have successfully removed the links in the footer and the 'create new page' in the sidebar (without removing the entire sidebar).

Now I will add the field for a alternate starting page.
Does anyone have suggestions for which pages should be allowed as a starting page?
Or should I take Angryboy's suggestion and redirect to the next available nav tab?

Re: 'Multi User 1.4' Plugin

When adding a file user-managment.php to the plugin folder
Admin page Unable to load XML file!
What should i do?

Re: 'Multi User 1.4' Plugin

JustSaint wrote:

When adding a file user-managment.php to the plugin folder
Admin page Unable to load XML file!
What should i do?

What version getsimple are you using?

Re: 'Multi User 1.4' Plugin

mikeh wrote:

One thing I want to note is that permissions hide the functionality and kill the page if they try to access it directly. They do not only remove the menu items.

Ha, I didnt realize this because when I tested the plugin - i ran into this bug

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

23 (edited by mikeh 2011-04-11 14:45:52)

Re: 'Multi User 1.4' Plugin

I have uploaded version 1.1 to extend:

Changes Include:

- Links in Admin Panel footer will now be hidden based on permissions set
- Added 'Disable Admin Access' Checkbox:
    - If Checked, the user will not be able to manage users or access the 'user management' screen.
- Added 'Custom Landing Page' dropdown:
    - The ability to select an alternate landing page the user will land on after login (useful if 'pages' is disabled)
- Language files installed will automatically show up in the 'Language' dropdown
- Cleaned up jquery using Chris's suggestion

Important Change To Note:
I have rearranged the xml file (Taking Chris's Suggestion) by putting all of the permissions in <permissions></permissions>
This means that if you have already used the multi user plugin, and you upgrade to v1.1, you will need to reset the permissions by editing the users.

Re: 'Multi User 1.4' Plugin

Mighty fast improvements there, mikeh! With that speed, all the bugs will be ironed out in no-time!

As I'm sure you're working with the feedback everyone has dished out at the moment, I won't add anything else (in fact there really isn't anything else, to be honest). Of what you have updated, things are all gravy and functional. All I can really say is keep at it and this'll be something people will want for the core of the next big update of GS :)

Tutorials: I18N News 3, I18N Blog *new!*

Re: 'Multi User 1.4' Plugin

Angryboy wrote:

this'll be something people will want for the core of the next big update of GS :)

i can already hear the calls for it now... haha

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!