Click to See Complete Forum and Search --> : user rights permission problem


zuzupus
08-29-2003, 02:54 AM
hi,

i got probelm regarding user rights permission for directories for eg. if parent directory have child directories let say child1 and for child1 there is one child let say child2,

so if i give user no rights on paren directory he will not be able to see child1 and child2 ther is no sense to see,

im struggling from last 2-3 days if anybody interested i can post the link and code

thanks in advance

GavinPearce
08-30-2003, 09:57 AM
link and code, mite be able to understand a bit better.

zuzupus
09-01-2003, 04:28 AM
thanks gavi
but im struggling with database

i got problem regarding tree structure for assigning user permission rights so that when user permission set to No Rights he dont have acess to particular parent directory then he wont able to see child as well as grandchilds,for eg.
if i set no rights to PARENT1 he wont able to see CHILD1,2 and 3
PARENT1 (pk_dir = 1, diradress= 1)
__CHILD1 (pk_dir = 23, diradress= 1|23)
_____GRANDCHILD11 (pk_dir = 345, diradress= 1|23|345)
_____GRANDCHILD12 (pk_dir = 346, diradress= 1|23|346)
_____GRANDCHILD13 (pk_dir = 347, diradress= 1|23|347)
__CHILD2 (pk_dir = 35, diradress = 1|35)
_____GRANDCHILD21 (pk_dir = 456, diradress= 1|35|456)
_____GRANDCHILD22 (pk_dir = 457, diradress= 1|35|457)
__CHILD3 (pk_dir = 46, diradress = 1|46)
_____GRANDCHILD31 (pk_dir = 506, diradress= 1|46|506)
________GRANDGRANDCHILD311 (pk_dir = 657, diradress= 1|46|506|657)

so i thought add a variable (say 'diradress') inside the t_directories table + need to fill in the value for all records
but im confused how to insert all records as the list is too long if i start inserting manually it will take ages to do,anybody lnows querry for this

CREATE TABLE t_directories (
sys_pk int(11) NOT NULL auto_increment,
diradress int(11) NOT NULL // is is correct or it should auto_inc
PRIMARY KEY (sys_pk))

im sending my PHP files and link is

http://server2.vitodesign.com/scripts/thepage.phtml

hope this is clear for you
thanks