Ticket #1001 (assigned task)

Opened 2 years ago

Last modified 1 year ago

XMLRPC plugin needs an interface to get identifiable user information user.info()

Reported by: karladam@mac.com Assigned to: coderanger (accepted)
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords: user info programming accessibility
Cc: Trac Release: 0.10

Description (Last modified by athomas)

Currrently when you query for a ticket's information you get all the attributes on it, however I have no way to identify a user uniquely besides their username which is only relevant on the server. So I can't contact that user through his email information or have a local application specific user store that can query this information for particular users. So if I had this interface I could get a user's full name(first and last), and at least his email. I assume the AccountManagerPlugin could extend the attributes available for a user and maybe even add more calls like a user.getAll()

Attachments

Change History

12/14/06 06:07:42 changed by coderanger

  • owner changed from athomas to coderanger.
  • status changed from new to assigned.

12/20/06 05:52:33 changed by athomas

  • description changed.

This could be added to AccountManagerPlugin or perhaps user session introspection could be added to XmlRpcPlugin.

08/21/07 06:12:42 changed by osimons

I have made a version that returns the env.get_known_users() call - customised for our particular setup in several ways, but very easy to implement in a straight forward fashion (untested example implementation):

def getKnownUsers(self, req):
    """ Docs :-) """
    return self.env.get_known_users()

It allows us implement 'assign-to' as a drop-down in a custom ticket form, for instance.

The implementation is very easy - the difficult part with this is actually determining permissions - what permission should be required to fetch this list? It has many possible uses, not just tickets. However, it is easy to see that data can very easily be abused with relaxed permissions in public projects.

This calls for some precautions, and my feeling is that user-related features need to be spread out across various modules, and highly tuned to specific tasks and permissions.

  • An implementation for ticket.getKnownUsers() should perhaps just return the username for populating drop-downs (to assign), and perhaps only return data if the restrict config setting is enabled - and using corresponding ticket permissions.
  • The full-list example above could perhaps require TRAC_ADMIN?
  • An implementation for the AccountManagerPlugin to view and modify data belong in that plugin, and tuned to the needs and permissions of corresponding methods there (likely all TRAC_ADMIN).

08/21/07 06:28:10 changed by osimons

Ah, just noticed #1010 that explicitly request the ticket.getKnownUsers()-like aspect of this.

As this ticket is somewhat ambiguous (potentially covering several plugins), I suggest:

  • This ticket is moved to AccountManagerPlugin as a request for xmlrpc features added to that plugin.
  • And, the ticket-drop-down-related part is continued in #1010 as a possible extension to standard XmlRpcPlugin.

Add/Change #1001 (XMLRPC plugin needs an interface to get identifiable user information user.info())




Change Properties
Action