Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Customize ACP & Admin login redirect
#1
Hi there, I'm installing GetSimple for a client.
I will be granting access to the Admin CP,
but I don't want them to be able to make certain changes/additions etc.

For instance, I would like to conditionally remove or hide:
  • Pages, Theme and Plugin tabs
  • Health Check, Delete All Page Backups buttons, Use Fancy URLs checkbox, Custom Permalink input box
  • Other specific ACP features
As a test, I was able to hide some of the elements in admin/template/css.php & flushing /data/cache/stylesheet.txt
by adding a the style rule: 
Code:
// not for production usage
#sidebar, #editpages, #show-characters,
#filtertable, .gslogo, #nav_pages, .support,
#permalink, #flushcache, .warning, #sitename, #prettyurls {
    visibility: hidden;
}

I also noticed there's a variable css file I can use to conditionally add/remove show/hide elements when either the "super user" or "client" are logged into ACP ( tested style variable ).

I have 2 questions:
  1.  Is there a appropriate procedure to customize the ACP ?
  2.  Can I change the default page redirect from admin/pages.php when an Admin logs in ? 

Apologies for the long winded explanation.
Any help or guidance is greatly appreciated thnx.
Reply
#2
Have you had a good look at the Multi-User Plugin?
http://get-simple.info/extend/plugin/multi-user/133/
It does quite a lot of what you want.

Finding the right plugins is half the battle round here
Reply
#3
There is only that plugin and hacks. 3.4 has some plans for this but is a bit hard now, you can always make a hardcoded plugin to use hooks and die()
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
Thanks for the responses. I will definitely test plugins to accommodate necessary customization.
I will most likely end up writing a plugin for this too.

On a related note, I've made some progress outside of having to use css to hide elements.
For the Admin Tabs, I removed/added list items in /template/include-nav.php

eg, to remove the pages tab, delete/comment out: 
Code:
<li id="nav_pages" ><a class="pages" href="pages.php" accesskey="<?php echo find_accesskey(i18n_r('TAB_PAGES'));?>" ><?php i18n('TAB_PAGES');?></a></li>
The bonus to this approach is the existing tabs move into place of the ones removed

For the Admin Login redirect, I simply added a header() call in /pages.php,
placed after include('template/include-nav.php'), using, for instance: 
Code:
<?php # header( "Location: upload.php" ); # Admin Login redirects to uploads.php > pages.php ?>
Now I just have to see about the feature buttons, input/check boxes and other menus etc and obv have to conditional states for specific Admin's.

Please let me know if you think there are any potential flaws, bugs, and or holes that could occur as a result from using these approaches.

Thanks again
Reply
#5
You could probably do the same with a htaccess rewrite somyou do not have to modify core files everytime
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#6
Also please provide feedback on what you want to control for future reference.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
(2016-10-17, 11:29:50)shawn_a Wrote: You could probably do the same with a htaccess rewrite somyou do not have to modify core files everytime
Very good point. I tend to stay away from Directives as some sites I co-admin have run into "issues" relying wholly on .htaccess. I will revisit this.

(2016-10-17, 11:30:34)shawn_a Wrote: Also please provide feedback on what you want to control for future reference.
At present I don't have a complete list of optional features but will try to report more in the future.

Thanks again Smile
Reply
#8
(2016-10-14, 19:47:31)Timbow Wrote: Have you had a good look at the Multi-User Plugin?
http://get-simple.info/extend/plugin/multi-user/133/
It does quite a lot of what you want.

Finding the right plugins is half the battle round here
Finally got a chance to test multi-user plugin, it's pretty close to what I need.
As I stated, I just have to remove/customize a few other little features.

Much appreciated
Reply
#9
I'm in the process of building a much simpler, more flexible user/ group/ permission plugin.
You could go as far as allowing read/write/delete access only for specific pages, or restricting configuration access for specific plugins. A first version of the PHP API will be ready next week.
Reply
#10
Id love to see a multi user that is easy to add configs to to block stuff, like get post querystring patterns and js element hiding.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#11
(2016-10-19, 09:32:55)shawn_a Wrote: Id love to see a multi user that is easy to add configs to to block stuff, like get post querystring patterns and js element hiding.

Yup, PHP, JS and CSS will be available, based on URI and querystrings. Smile
Reply




Users browsing this thread: 1 Guest(s)