-
Type:
Suggestion
-
Resolution: Duplicate
-
Component/s: Core - Content REST APIs
-
Environment:Apache 2.0 using mod_jk to forward requests to Tomcat 4.1.31, running against an Oracle 9i database, all running on Red Hat Enterprise Linux 3
There is no clean way to tell via the remote API whether a particular user is already registered in Confluence. Calling getUser( ) for a user that does not exist throws an exception (rather than politely returning a failure code). Calling addUser( ) for a user that already exists also throws an exception (rather than politely returning a failure code). These exceptions cannot be distinguished from serious exceptions that might somehow occur since they are just HTTP 500 errors with no meaningful description of the cause. The resulting exceptions severly pollute the log since each one throws two separate exceptions to the log for a total of more than 100 lines each. Note that log exceptions may be related to Tomcat only, I vaguely recall it handles error forms a bit differently and maybe doesn't like Confluence custom error pages.
Use Case Scenario: A new wiki convert/champion has created some spaces and wants their working group (of say, 40 people) to be given access so they can all collaborate using the new spaces. To avoid manually creating users or having users sign up themselves and then have to wait to be given permissions to the space, a bulk user loading mechnism is desired. This allows the announcement and full access for the users to be simultaneous.
The new champion provides a list of the 40 user ids corresponding to those to be added. The data is loaded by a program that executes an addUser( ) and addUserToGroup( ) call for each listed user. However, some of the 40 people have already gotten access by one means or another. Each time the program attempts to add one of these users, an undistinguished exception is thrown and the program must guess that means they are already registered as a Confluence user. The log fills with meaningless exception trace dumps.
- is duplicated by
-
CONFSERVER-4154 Can't figure out how to detect whether users exists from remote API
-
- Closed
-