'Multi User 1.4' Plugin - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: 'Multi User 1.4' Plugin (/showthread.php?tid=1549) |
'Multi User 1.4' Plugin - mikeh - 2011-04-10 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:
I created a function, which other plugins can use, that will add a permissions checkbox onto the manage users page. Example below: Code: <?php add_mu_permission('blogsettings', 'Blog Settings'); ?> Below is a screenshot of the effect of adding that function and a few other permissions: Now that the data is stored in the users xml file, the plugin author can access that by manually loading the xml file or by using a function the multi user plugin provides. Example Below: Code: <?php check_user_permission($username, $permission_node); ?> The above (check_user_permissions()) function will return an array of all permissions in the following format: 'permissionname'=>bool Plugin Screenshots Below: User Management Screen: Edit User: Add User: 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 Version 1.5 (2012-03-27)
Version 1.6 (2012-06-01)
Version 1.7 (2012-06-01)
For some reason Get Simple does not use the SimpleXMLExtended class and instead uses SimpleXMLElement to save the user file. Because of this the CDATA is removed from the bio node in the users xml file if a user save data from the settings page. This might be a problem if certain special characters are used in the editor. We shall see. Version 1.8.2 (9-21-2012)
This was my first plugin so let me know if anyone catches any bugs or mistakes. 'Multi User 1.4' Plugin - n00dles101 - 2011-04-10 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..... 'Multi User 1.4' Plugin - singulae - 2011-04-10 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! 'Multi User 1.4' Plugin - mikeh - 2011-04-10 n00dles101 Wrote:Hey Mike, Thanks for the heads up. I added the url and re-uploaded it to extend & this post. 'Multi User 1.4' Plugin - mikeh - 2011-04-10 singulae Wrote:great-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. 'Multi User 1.4' Plugin - ccagle8 - 2011-04-10 Wow mike. Great looking plugin. I'll give it a test drive tomorrow sometime. 'Multi User 1.4' Plugin - Angryboy - 2011-04-10 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):
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* 'Multi User 1.4' Plugin - hameau - 2011-04-10 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). 'Multi User 1.4' Plugin - mikeh - 2011-04-10 Angryboy Wrote:Works perfectly as promised and will be really benefitial for GS users with larger sites Appreciate the feedback.. I will definitely add the ability to set an alternate starting page, and look into your other suggestions 'Multi User 1.4' Plugin - polyfragmented - 2011-04-10 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! 'Multi User 1.4' Plugin - ccagle8 - 2011-04-10 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: Code: $xml = new SimpleXMLElement('<item></item>'); 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. 'Multi User 1.4' Plugin - Oleg06 - 2011-04-11 after adding a user attempts to log me appears Code: You Do Not Have Permissions To Access This Page 'Multi User 1.4' Plugin - PRAG - 2011-04-11 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. 'Multi User 1.4' Plugin - Oleg06 - 2011-04-11 Yes, the plugin is very useful, thanks. and the language file will be? 'Multi User 1.4' Plugin - mikeh - 2011-04-11 ccagle8 Wrote:Wow, i must say Mike - this is a great job. A few things that I noticed: 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. 'Multi User 1.4' Plugin - mikeh - 2011-04-11 Oleg06 Wrote:after adding a user attempts to log me appears 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. 'Multi User 1.4' Plugin - Oleg06 - 2011-04-11 Yes, I already knew, and I welcome the development of language files 'Multi User 1.4' Plugin - hameau - 2011-04-11 Blocking access to 'Theme' is never saved because of a typo in user-managment.php, line 77: Code: --- if (isset($_POST['Theme']) && $_POST['Files'] == 'no') { 'Multi User 1.4' Plugin - mikeh - 2011-04-11 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? 'Multi User 1.4' Plugin - JustSaint - 2011-04-11 When adding a file user-managment.php to the plugin folder Admin page Unable to load XML file! What should i do? 'Multi User 1.4' Plugin - mikeh - 2011-04-11 JustSaint Wrote:When adding a file user-managment.php to the plugin folderWhat version getsimple are you using? 'Multi User 1.4' Plugin - ccagle8 - 2011-04-11 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 'Multi User 1.4' Plugin - mikeh - 2011-04-12 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. 'Multi User 1.4' Plugin - Angryboy - 2011-04-12 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 'Multi User 1.4' Plugin - ccagle8 - 2011-04-12 Angryboy Wrote:this'll be something people will want for the core of the next big update of GSi can already hear the calls for it now... haha |