Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Does Tigra support security levels?
Tonya
Junior Member

Posts: 5
Registered: 7/21/2004
Member Is Offline
posted on 7/21/2004 at 02:40 AM Reply With Quote
Does Tigra support security levels?


I've been looking for a portal type menu system for a while and have seriously considered the DotNetNuke system. The thing I like about it is its ability to only display menu options according to security levels assigned to users. Does Tigra have this option?
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/21/2004 at 01:07 PM Reply With Quote

You can do that with Tigra Menu (free/pro/gold) and additional server side code. It is not recommented to do such checks on the client side because in this case you'll need to send to client side information about menu items for all user roles which make it available for viewing (security issue).
View User's Profile View All Posts By User U2U Member
Tonya
Junior Member

Posts: 5
Registered: 7/21/2004
Member Is Offline
posted on 7/22/2004 at 07:41 AM Reply With Quote
Any hints how please


I want to use an SQL database table of users and their access levels and use these levels to determine what tabs on the menu they can see and access. Any hints or examples of how this can be achieved would be really apppreciated.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/22/2004 at 02:24 PM Reply With Quote

Ok, here is one simple approach:
You create separate items structure (the one that normally in menu_tiems.js) for each user role and put them as field in appropriate records in the database table containing list of the roles. In this case each user group has own items structure assigned. Once you determined what group user belongs to you just output items structure to the browser where menu is displayed.
View User's Profile View All Posts By User U2U Member
Tonya
Junior Member

Posts: 5
Registered: 7/21/2004
Member Is Offline
posted on 7/23/2004 at 02:28 AM Reply With Quote
How?


Sorry to be difficult but I simply don't know how to do it. Judging from the interest in this thread there are many others out there that would like to know about this also.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/23/2004 at 04:29 AM Reply With Quote

No problem with additional questions.
What part of proposed solution requires clarifications?
View User's Profile View All Posts By User U2U Member
Tonya
Junior Member

Posts: 5
Registered: 7/21/2004
Member Is Offline
posted on 7/23/2004 at 07:00 AM Reply With Quote
OK lets have a go...


I follow what you are saying regarding the SQL tables and I can see where these may be referenced in the inc file but I don't see how. Let's say I have two users UserA and UserB. UserA has access level 1 (can see all {3} menu tabs) but UserB should only be able to see some {2} of the tabs. How do I do it?
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/23/2004 at 03:36 PM Reply With Quote

Ok, we can simplify that to some code like this:

var MENU_ITEMS = [
['item1', ....],
['item2', ....],
<? if ($user == 'UserA') { ?>
['item3'...]
<? } ?>
];

makes sence?
View User's Profile View All Posts By User U2U Member
Tonya
Junior Member

Posts: 5
Registered: 7/21/2004
Member Is Offline
posted on 7/25/2004 at 11:19 PM Reply With Quote
Thanks, we're going well with this.


I follow that ok but now where do I put it? Does it go in the section of the inc file that references the part of the menu that I want to restrict? I have included below the line where I suspect it may go. If I am right can you get me started please.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 7/26/2004 at 02:50 PM Reply With Quote

1. you can rename menu_items.js to menu_items.php or menu_items.asp and put the code in that file.
2. (recommended in this case) you can put that code in <script ..> tag in the same document. Just make sure it is above the menu initialization so MENU_ITEMS variable is available at the moment menu is being created.
View User's Profile View All Posts By User U2U Member
icode4u
Newbie

Posts: 1
Registered: 10/3/2005
Member Is Offline
posted on 10/15/2005 at 05:16 AM Reply With Quote

What I do is add a security field to the database then based on what level their security is will be what menu items I show.
e.g rs.open "SELECT * FROM table WHERE security <="&session("security"), conn
View User's Profile View All Posts By User U2U Member
LordMerlin
Member

Posts: 12
Registered: 6/10/2006
Location: Johannesburg, South Africa
Member Is Offline
posted on 6/10/2006 at 10:21 AM Reply With Quote

How about?

Code:

var MENU_ITEMS = [
<? if ($user == $access_level) { ?>
['item1', ....],
['item2', ....],
['item3'...]
<? } ?>
];

$access level can then be a field in the MySQL DB

What is the best way of doing this?
View User's Profile View All Posts By User U2U Member
tmh
Junior Member

Posts: 2
Registered: 6/20/2006
Member Is Offline
posted on 6/20/2006 at 10:25 PM Reply With Quote
Using ASP?


Can I use the following ASP coding?

var MENU_ITEMS = [
['item1', ....],
['item2', ....],
<% if Session.Contents("UserType") = "2" then %>
['item3'...]
<% end if %>
];

After that I renamed the file as menu_items.asp and replaced the line
<script language="JavaScript" src="menu.js"></script>

with this:
<!--#include file="menu_items.asp"-->

in the file that references the menu.

I can't seem to get it working though... please can anyone help me out?
Thanks a bunch... :)
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 6/21/2006 at 09:09 AM Reply With Quote

you shouldn't replace

<script language="JavaScript" src="menu.js"></script>
this:
<!--#include file="menu_items.asp"-->

you should replace
<script language="JavaScript" src="menu_items.js"></script>
with
<script language="JavaScript" src="menu_items.asp"></script>
that's in case you want to keep structure in the separate file or replace
<script language="JavaScript" src="menu_items.js"></script>
with
<script language="JavaScript">
<!--#include file="menu_items.asp"-->
</script>
if you want to move items structure inside the main document file

also in your code:

var MENU_ITEMS = [
['item2', ....], // <--- this comma
<% if Session.Contents("UserType") = "2" then %>
// <--- must be here because there shold be no comma if there are no subitems
['item3'...]
<% end if %>
];
View User's Profile View All Posts By User U2U Member
tmh
Junior Member

Posts: 2
Registered: 6/20/2006
Member Is Offline
posted on 7/4/2006 at 08:01 PM Reply With Quote

Thanks alot for the guidance, I've finally managed to get the menu up and working!

Just one slight thing though, whenever I mouse over and then mouse out the menu, the status bar at the bottom displays "Error on page". When I double click on it, the error message box displays as follows:

Line: 64
Char: 1
Error: Object expected
Code:0
URL:[the page URL here]

rgds,
tmh
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Tigra Menu
Product Demonstrations Live Demos:
Traditional Blue
White Steps
Inner HTML
All Together
Frames Targeting
Free Download Free Download
Free Download Menu Builders
Online Builder
Builder for Windows
Product Documentation Documentation:
Documenation Page
Change Log
Menus Comparison Table
Support Forum Support Forum
 
Tigra Menu PRO
Product Demonstrations Live Demos
Alignment & Multimenus
Unlimited Depth
Item sizing and positioning
Inner HTML
Frames, Targeting
Static Positioning
Free Download Menu Builders
Online Builder
Product Documentation Documentation
Documenation Page
Tigra Menu PRO FAQ
Change Log
Menus Comparison Table
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 
Product Page Tigra Menu GOLD
Functionality demos Functionality demos
Multiple
Cross-framed
Select-boxes
Effects
Design demos Design demos
Icons & arrows
Idea!
Hi there!
Matrix
MS Style
XP Style
Dots
3D-Buttons
Product Documentation Documentation
Documenation Page
Change Log
Menus Comparison Table
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004