Authors fields & hide when formulas

Hi there,

I’m currently writing a notes application for project management where I use readers and authors fields containing groups to manage access rights. The database is basically writeable for everybody.

My question is: How can I make for example a button which is hidden, if the user is not an author of the document (that is, neither his name nor a group he belongs to is in the authors field).

I cannot use db-roles (because security is on a on-document-basis), I cannot simply use @isMember(user; authors) (because of the groups) and the other @-functions don’t seem to work either (like @UserAccess).

Thanks in advance,

Christoph Angerer

TU München

p.s.: If it matters: we are using release 6.02 on solaris

Subject: Authors fields & hide when formulas

Why don’t you get the members of author group using DBLookup from the address book? It gives you the list of individual name and then use @IsMember to hide.

Dhana

Subject: RE: Authors fields & hide when formulas

Hi,

thanks for your response.

We are using nested (hierarchical) groups, so I can’t simply make one lookup for the group members. And I wanted to avoid programming something like a “recursive” method with @-formulas:-)

Notes handles the access rights correctly (that is, if I click on the button and I am not an author, I cannot edit it, of course) so I wondered if there isn’t a simple way to use this ability in formulas…

Thx,

Christoph

Subject: Authors fields & hide when formulas

Hi

try to use @IsMember(@UserNamesList;Authors) or similar :-))

Moreover have a look in the help database at the function @UserNamesList.

This might help you with the problem of the group memberships.

Bye

Hynek

Subject: RE: Authors fields & hide when formulas

Hi

good idea, it seems to work…

You can’t use @IsMember but similar:-)

For everyone who is interested, here’s my hide when formula:

rem “compare canonical names”;

user:=@Name([Canonicalize];@UserNamesList);

authors:=@Name([Canonicalize];Authors);

rem “use @keywords to determine if an entry matches. if @nothing, then hide”;

@keywords(authors;user)=@Nothing

cu and thx again,

Christoph

Subject: RE: Authors fields & hide when formulas

If your Authors list is not already canonical, there are cases where it won’t work. Refer to docs.

Subject: RE: Authors fields & hide when formulas

Christoph,

Just trying to implement what you did to check for user access, and hide if not authorised.

Where would you put your script and the if@Nothing then hide formulas for this to work?

I am trying to hide a table in a document if a user is not part of a particular access group.

Thanks,

Duncan