So, to sum it up, the check would look something like this...

config.extensions.tiddlyweb.getUserInfo(
        function(user){
                if(user.anon){
                        //guest
                }else if(readOnly){
                        //user
                }else{
                        //member
                }
        }
);

I guess, my initial idea of storing such a value into some variable
probably is not a wise choice. So, maybe the user object returned by
getUserInfo would do good with an additional flag, e.g. a
user.status[string] or a watered down user.member[boolean]. My
preferred alternative probably reads like this...

config.extensions.tiddlyweb.getUserInfo(
    function(user){
        switch (user.status){
        case 'owner':
            //not existing yet
        case 'member':
            //only for members
        case 'user':
            //only for users
        default:
            //external visitors
        }
    }
);

Cheers, Tobias.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to