Example
--------------
Category c1, c2, c3
c1.name = Student Id
c1.access = { s/group:R, a/group:R,W, pra/user: R,W }
c1.templates = {t1}
c2.name = Student Info
c2.access = { s/group:R,W }
c2.templates = {t1,t2}
c3.name = Student Lock
c3.access = { s/group:R }
c3.templates = {t2}
Template t1, t2, t3
t1 = {id:Number}
t2 = {name:String, address:String}
Users venk, din, vin, pra, sub
Group s, a
a = {din}
s = {vin, sub, pra}
Pagelets p1, p2, p3, p4
p1.categories = c1
p1.data = {id:"subhan"}
p2.categories = c1,c2
p2.data = {id:"subhan",name:"Subhan M", address:"3354 KR Rd, Bangalore"}
p3.categories = c2
p3.data = {id:"subhan",name:"Subhan M", address:"3354 KR Rd, Bangalore"}
p4.categories = c1,c2,c3
p4.data = {id:"subhan",name:"Subhan M", address:"3354 KR Rd, Bangalore"}
(Note that I am not including the Pagelet authorship info here)
Now what is the PageletView of these pagelets for the different users when they signin.
venk
din
vin
pra
sub
(ok, will send "answers" in the next mail later today, while you get a chance to mull)
Example - continued.
--------------
(Note that I am not including the Pagelet authorship info here). Also note that
p2, p3 and p4 have coincidentally same date. They might have been different.
For a signed in user, what is the "view" of these pagelets?
venk: none (as venk is not named in any of the categories' access)
din: can edit and read t1 portion of p1, p2 and p4. Note: Cannot read t2 info
vin, sub:
p1 - can read t1 (i.e., the field id),
p2 - can only read t1, but can edit t2,
p3 - can read and edit both t1 and t2,
p4 - can read t1 and t2 but cannot edit t2
pra:
p1 - can read and edit t1 (i.e., the field id),
p2 - can read and edit t1 and t2,
p3 - can read and edit both t1 and t2,
p4 - can read t1 and t2 but cannot edit t2
Venkatesh called and indicated how venk and choose to annotate the pagelets for his own eyes by adding:
Category c4
c4.name = Venk Annotations
c4.access = {venk/user: R, W}
c4.templates = {tv}
Template tv
tv = {vannote:String}
and then add pagelets to c4 that are to be annotated
p4.categories = c1,c2,c3,c4
p4.data = {id:"subhan",name:"Subhan M", address:"3354 KR Rd, Bangalore",vannote:"wonder why this is locked. need to verify"}
An "author" role can enhance the access control further:
p4.author = t1/group-a, t2/user-sub, tv/user-venk
Also c2.access can be defined as:
c2.name = Student Info
c2.access = { s/group:R,W author}
c2.templates = {t1,t2}
which would mean only the author can edit their fields.
so if p3 is authored by sub, pra or vin cannot edit it.
d