Stefan Ritt wrote: |
Szu-Ching Peckner wrote: |
Stefan Ritt wrote: |
Szu-Ching Peckner wrote: |
I don't think there is a good secure way so far, but would like to have your opinion.
If I want user to create logbook for themselves, what's the best way to do it? I guess Execute $attribute = <command> may work, have it write to cfg file, but obviously it impose security problem. Is there a good and secure way to allow user to create logbook themselves?
|
Actually there is no good secure way. What I usually do is to give users admin rights on individual logbooks, then they can change the config of that logbook. Many times adding some attribute is as good as creating new logbooks. Like if you need two logbooks "home" and "work", you can create an attribute "type" and let the type be "home" or "work". With conditional attributes you can make the logbook behave differently for the two values of "type" and get most functionality of two separate logbooks.
- Stefan
|
Is there a way to set user permission based on certain attribute? can Allow command = <user list> based on attribute?
for example, say type home, user1 can read, user2 can write, user3 can not access type home, but can access type work.
In short, is access control available when I use type to get functionality of separate logbooks? If so, how is this access control done?
|
Actually I never tried that. Using conditional attributes, you could try that out, but no guarantee that it works. Like
Options type = home{1}, work{2}
{1}Login user = you, me
{2}Login user = me, other
You could play with "login user", "Allow command" and "Deny command".
/Stefan
|
Thanks for reply Stefan.
I tried it, didnt work. I think its expected it didn't work though, or maybe I didn't try it right.
==============
[logbook1]
Login user = user1
Options Type = Home{1}, Work{2}
{1} Login user = user2
This will make user2 unable to login logbook1 at all
============
[logbook1]
Login user = user1, user2
Options Type = Home{1}, Work{2}
{1} Login user = user1
{2} Login user = user2
user1 can login, can search Work type entries, create new entry with Work type.
==============
[logbook1]
Login user = user1, user2
Options Type = Home{1}, Work{2}
{1} Deny New = user1
user1 can still create entries for Home type. I think it's because when user1 login, command New is available for user1, so when user1 click on New, doesn't matter what type user1 choose, submit button is available. If I have Deny New = user1 under logbook1, New is not available, that means user1 can't create entry for Work type either.
===============
seems to me under current code, access control has to be done based on logbook, not attribute. Do you agree?
if that's the case, we may have a lot of logbook because of access control we want to implement. So there is another question:
selection page show all logbooks. Is there a way to make selection page and tabs show logbooks based on user access?
For example, we have 20 logbooks, user1 has acces to 3, when user1 login, selection page only shows that 3 logbooks for user1, and only 3 tabs for user1.
I thought about using group to get logbooks more organized, however I will still face the situation that one group may have 20 logbooks.
Or what would you do to handle this situation? (I asked selection page question earlier in another entry). Maybe we should discuss on that entry? Message ID: 67319
Thanks again.
|