> where does this peculiar 'anon' have its origin? Never heard of this
> before. Does that simply stand for anonymous?
That's right.
> Would you think, too, that it made sense to turn this into a global
> utility function in the TiddlySpace core? ...returning the visitor
> status with respect to a space ...which as of today would thus be one
> of 'member', 'user' or otherwise 'anon'
That sounds reasonable - however, I just realized that I was
overcomplicating things:
// set global read-only mode based on membership heuristics
var indicator = store.getTiddler("SiteTitle") || tiddler;
readOnly = !(recipe.split("_").pop() == "private" ||
tweb.hasPermission("write", indicator));
That's an excerpt from TiddlySpaceConfig - so you just have to check
read-only mode (plus employ getUserInfo if you want to distinguish
between anonymous visitors and non-members).
(Aside: There's a logic error in the snippet I'd posted. The else branch
in the members callback would never be executed, as the list of members
is only accessible to space members - so that would move into the
errback instead.)
-- F.
--
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.