Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...TabInfo.IsAdminTab - No longer valid in DNN 5.0?TabInfo.IsAdminTab - No longer valid in DNN 5.0?
Previous
 
Next
New Post
1/8/2009 8:48 PM
 

John Mitchell wrote
 

I think the reason Bruce started this thread was because he had a problem in his module.

John is correct : I raised the thread to get a more complete understanding of the thinking behind the change.  It's wrong to assume developers are going to use the 'IsAdminTab' for security purposes : it's quite clear you should be checking the user permissions for that.  In my case I use the IsAdminTab in the Friendly Url Provider code to not bother generating Friendly Urls for Admin tabs.  Some Admin modules don't like Friendly Urls, and there's no point in using up processing on non-public facing pages for friendly urls.

So, in terms of appearances for modules like menu modules, and other modules, the IsAdmin property was quite useful to determine display type settings.

I'm in two minds : the change is correct (to always display false) because the concept of an Admin tab no longer really exists, but then again, it's incorrect, because an Admin tab is still an Admin tab if it contains functions to do with Administrating the website : it's a boolean set on tab purpose rather than tab security settings, or which use has access.  To me it would probably be useful to be able to set the property explicitly (and default it to true for the core admin tabs).  But that would require a database change, and it probably still wouldn't stop sneaky errors coming in.

I'll just have to come up with some other way of determining admin tabs vs ordinary tabs.  Any solution will be imperfect though : a boolean is the only solid solution.  Oh well :|

 
New Post
1/8/2009 8:57 PM
 

like John suggested, you could check for the tabpath, thats a public property of TabInfo, and if it starts with //admin it is reasonably safe to assume this is the admin menu.

My point was that it is possible to actually change the name of the admin root page now, which would change the tabpath value, so you can never be 100% sure. Alternatively you could check the authorizedroles property and not calculate friendly urls when the the only authorized role is the administrators role. That would mean that you would skip calculations for any page that is only accesible to administrators.. .not sure if that is what you want...


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
1/9/2009 2:54 AM
 

[quote] if it starts with //admin it is reasonably safe to assume this is the admin menu[/quote]
It may be just me but I disagree with that. For the business I put sites up for, I often name a tab Administration, as that is where the corporate/managers do their adminstrating; Which if you just checked if it starts with '//admin' would also be true when checking IsAdmin but that obviously shouldn't. It's a very clear word to name the tab
I didn't use Admin solely because of the Admin meny that was default for DNN. Administration is a big word to have in the root meny, I'd love to be able to swap DNN's Admin to be Administration and vice versa for the users. It will shorten the meny and help prevent overflow.

If IsAdminTab returned true if the only permission that had view permission on that tab was the Administrator Role, I think that would be a good use of the IsAdminTab. It's certainly not the same as it was before, but with the modification that took out the Admin menu, I think recylcing the flag to identify a page as being viewable to admins only would be a good use for it. How/When it would be used, I don't know; I have rarely used that (if ever), so I don't think about it much.

 

That's my 2c for now. :)

 

 
New Post
1/9/2009 3:15 AM
 

ErikVB wrote
 

like John suggested, you could check for the tabpath, thats a public property of TabInfo, and if it starts with //admin it is reasonably safe to assume this is the admin menu.

My point was that it is possible to actually change the name of the admin root page now, which would change the tabpath value, so you can never be 100% sure. Alternatively you could check the authorizedroles property and not calculate friendly urls when the the only authorized role is the administrators role. That would mean that you would skip calculations for any page that is only accesible to administrators.. .not sure if that is what you want...

Erik is correct here : you could theoretically change the tab path for the admin pages.  Probably more likely on ML sites : presumably they might like to modify this to a local language version of 'Admin'. 

To fix my software, I'm putting in a configurable field called 'AdminPageName' which defaults to 'admin' but can be changed per-portal to different values.  Thus 99% of the cases will work OK, but the edge case can also be handled with extra configuration. 

I would say a simlar approach would be a useful addition to the site settings to specify which tab contains the root of the admin menu : thus every page below that could have the 'IsAdmin' value specified as 'true'.   This would assist those developers making modules which cut across all pages in DNN, not just content-specific user pages.  Things like skins with inline code, menus, providers, etc.  There are many reasons to want to easily detect an admin page which have nothing to do with security.

I might develop a solution and put it up on Gemini but we'll see if it's well received or not.

 
New Post
3/25/2010 9:39 AM
 

I just had some trouble with this. I basically have a dropdown menu which lists all DNN tabs except admin tabs, checking for isAdminTab. Now of course these admin tabs are listed. So what's the best way to exclude them? I'm really not sure what permissions I have to check, and against what.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...TabInfo.IsAdminTab - No longer valid in DNN 5.0?TabInfo.IsAdminTab - No longer valid in DNN 5.0?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out