Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Omit "All Pages" from the Tools menu

edited June 2014 in Framework

I guess this is a feature request. I created a class of users called managers and checked "Basic admin access" and a limited set of permissions. When they log in, I don't want them to see the "All Pages" link under tools, but it looks like it's hard-coded in apps/admin/handlers/head/links.php.

Comments

  • Good suggestion. There are permissions for everything else except restricting pages (adding, editing and deleting yes, but not hiding the edit controls and "All Pages" link). Just added it and pushed to Github :)

  • Thanks! However, I can't update right now because of something else I've been meaning to ask about. I added override code to apps/user/handlers/add.php and apps/user/handlers/edit.php

    Is there an issue with doing that or would you be willing to add it to the master?

  • If you're using git to manage your customizations, it should be able to pull changes without clobbering your customizations. I'll usually start with cloning the Elefant repo via git clone then do:

    git remote rm origin
    git remote add origin https://myprivateprojectrepository.git
    git remote add elefant https://github.com/jbroadway/elefant.git
    

    Then periodically I can do a git pull elefant master to merge the latest Elefant sources. That always grabs the latest master (which may not be what you want on a production site), but I usually stick with master while in development anyway.

    As for overrides for user/add and user/edit, I have some ideas as to how the user management can change to integrate custom apps, which are related to the planned org/group additions. When I look at it in more detail and see how big the changes will be, I'll see if it makes sense to add overrides for those handlers too. But for now, the workflow above should help :)

  • So do you mean that I should add apps/user/handlers/add.php and apps/user/handlers/edit.php to .gitignore?

  • No, if you're using Git to manage your own customizations, then you would just commit them via:

    git commit -m "Added overrides" apps/user/handlers/add.php apps/user/handlers/edit.php
    

    Then (assuming you've changed your remotes like mine), you can push/pull to your own private origin server (e.g., a private Github repository, or what I do is use Bitbucket which has free private repository hosting), and you can merge the latest Elefant changes via:

    git pull elefant master
    

    It should intelligently merge them for you, or allow you to manually merge in the case of conflicts. Let me know if that makes more sense :)

  • Ah, I see. I've been just sticking with your master and doing everything in apps, unless submitting a pull request, when I just clone the current master, tweak and submit.

  • For individual apps I'm sharing with others, I'll make those separate repositories. For a complete site, I usually make a repository of the whole site so I can track all the changes I make (layouts, settings, etc).

  • Adding features mentioned above would be nice. I'd like the ability to hide custom fields, add pages and etc. even if just via CSS.

  • I just added a setting to hide All Pages. Create a file conf/app.admin.config.php with the following to hide it:

    ; <?php /*
    
    [General]
    
    show_all_pages = Off
    
    ; */ ?>
    

    You can also disable the All Pages link via access control by restricting access to the admin/pages resource. Creating custom roles is usually how I hide certain features from users.

Sign In or Register to comment.