+ Reply to Thread
Results 1 to 9 of 9

Thread: Permissions

  1. #1
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default Permissions

    We are considering setting up a vendor/customer portal into our MindTouch Core installation but I need to know a couple of things first.

    I know that if someone does not have access to a page they won't even know that those pages that they don't have access to even exist. What I really need to know is there a way to hide the Contributions, Users, Etc from the Tools menu? In short we do not want our vendor/customer knowing what other vendor/customer we do business with. They should only be able to see evidence of us and themselves.

    Better yet is there a way to block all those special pages entirely. Maybe a service to shutdown or something?
    Last edited by rberinger; 09-01-2009 at 08:01 PM.
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

  2. #2
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default

    UPDATE: I have been able to modify NeilW's HideElements template to target those menu options. However due to the overwhelming popularity of MindTouch I would still like to know if the functionality can be shut off entirely either by permissions or service in the event we get a vendor/customer who knows MindTouch and the way it serves special pages like that.
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

  3. #3
    Join Date
    Feb 2007
    Posts
    1,871

    Default

    Those pages you describe will only show data for pages you have access to. If you want to hide them completely, it's feasible that you could hide them through the UI, but you'd also want to block access to them through the URL by creating a title pre-processing hook which wouldn't process special pages unless you were an admin.

  4. #4
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default

    Quote Originally Posted by royk View Post
    Those pages you describe will only show data for pages you have access to. If you want to hide them completely, it's feasible that you could hide them through the UI, but you'd also want to block access to them through the URL by creating a title pre-processing hook which wouldn't process special pages unless you were an admin.
    Wow! Sound good can you give a hint on where I would start?
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

  5. #5
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default

    I have been successful at hiding almost everything from within the UI except the "Recent Changes" menu option. Any idea what the css would look like to hide it? I've done everything that I thought it should be but it always shows.

    It seems like i should be able to set: li.siteChanges {display:none;} but it still always shows.
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

  6. #6
    Join Date
    Mar 2008
    Posts
    1,630

    Default

    Quote Originally Posted by rberinger View Post
    I have been successful at hiding almost everything from within the UI except the "Recent Changes" menu option. Any idea what the css would look like to hide it? I've done everything that I thought it should be but it always shows.

    It seems like i should be able to set: li.siteChanges {display:none;} but it still always shows.
    Try adding some weight to the selector. I just tried this and it worked (on Fiesta):

    Code:
    div.body div.page div.siteNav li.siteChanges { display:none; }
    (I too hacked this into HideElements, since it turns out to be really nicely easy).

  7. #7
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default

    Quote Originally Posted by neilw View Post
    Try adding some weight to the selector. I just tried this and it worked (on Fiesta):

    Code:
    div.body div.page div.siteNav li.siteChanges { display:none; }
    (I too hacked this into HideElements, since it turns out to be really nicely easy).
    I guess patience really is a virtue. I was slowly working my way back the dom and i got to div.page and stopped. Just one more step and I would have been there.

    BTW NeilW I'm making a few changes to your template (as you already guessed) to be able to hide alot more items. I just need to add this part and put in a bit of further logic and I will send to you for review.
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

  8. #8
    Join Date
    Mar 2008
    Posts
    1,630

    Default

    Sure. Did you need to do anything more than add items to the "allowed_elements" map?

  9. #9
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default

    Quote Originally Posted by neilw View Post
    Sure. Did you need to do anything more than add items to the "allowed_elements" map?
    Simply put no. You built this very easy to extend. But I thought that I would add some logic to the effect: If we are hiding the tools menu but not the Watched Pages item under the tools menu then turn the tools menu visible again. Etc... Or instead of adding what to exclude reverse it and only add the items you want instead. Not sure how to approach this just yet.
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts