On Tue, 18 Feb 2014, Ferran Jorba wrote: > In other words, uid == -1 is like admin. Is my approach sensible, or > am I missing something and running into a dangerous zone?
Yes, your reasoning path was correct, although uid == -1 means a guest user, not an admin. This could create troubles if you later happen to plug your scripts to some web workflows, say. Would you like to return hidden fields in your CLI? If so, which API function(s) do you use in your scripts? E.g. if it is search_pattern(), then setting "ap=-9" would permit you to search for hidden fields too. In other words, depending on your concrete use case, it may be better not to play with uid's but rather use other existing parameters, or else introduce new parameters if they are not exposed to higher APIs. Best regards -- Tibor Simko
