On Monday, August 21, 2023 at 12:02:12 PM UTC-4 RjOllos wrote:

On Monday, August 21, 2023 at 8:40:32 AM UTC-7 Mauricio wrote:

Trying to come up with a way to check if a given user exists. User hairloss 
is not defined in test-repo. I expected it to bark at me, saying user did 
not exist or something. Instead, it acted like user was there 

trac-admin /srv/trac/test-repo permission list hairloss 

User Action 
------------------------- 
hairloss BROWSER_VIEW 
hairloss CHANGESET_VIEW 
hairloss FILE_VIEW 
hairloss LOG_VIEW 
hairloss MILESTONE_VIEW 
hairloss REPORT_SQL_VIEW 
hairloss REPORT_VIEW 
hairloss ROADMAP_VIEW 
hairloss SEARCH_VIEW 
hairloss TICKET_APPEND 
hairloss TICKET_CHGPROP 
hairloss TICKET_CREATE 
hairloss TICKET_MODIFY 
hairloss TICKET_VIEW 
hairloss TIMELINE_VIEW 
hairloss WIKI_CREATE 
hairloss WIKI_MODIFY 
hairloss WIKI_VIEW 


Available actions: 
BROWSER_VIEW, CHANGESET_VIEW, CONFIG_VIEW, EMAIL_VIEW, FILE_VIEW, 
LOG_VIEW, MILESTONE_ADMIN, MILESTONE_CREATE, MILESTONE_DELETE, 
MILESTONE_MODIFY, MILESTONE_VIEW, PERMISSION_ADMIN, PERMISSION_GRANT, 
PERMISSION_REVOKE, REPORT_ADMIN, REPORT_CREATE, REPORT_DELETE, 
REPORT_MODIFY, REPORT_SQL_VIEW, REPORT_VIEW, ROADMAP_ADMIN, ROADMAP_VIEW, 
SEARCH_VIEW, TICKET_ADMIN, TICKET_APPEND, TICKET_BATCH_MODIFY, 
TICKET_CHGPROP, TICKET_CREATE, TICKET_EDIT_CC, TICKET_EDIT_COMMENT, 
TICKET_EDIT_DESCRIPTION, TICKET_MODIFY, TICKET_VIEW, TIMELINE_VIEW, 
TRAC_ADMIN, VERSIONCONTROL_ADMIN, WIKI_ADMIN, WIKI_CREATE, WIKI_DELETE, 
WIKI_MODIFY, WIKI_RENAME, WIKI_VIEW


The command doesn't check whether the user exists because you could be 
adding a permission group.


     With that said, why is it listing the nonexistent user as if it is a 
member of all of those groups? I would understand if it listed a blank 
after the username. 
 

To check if a user exists, try the "session list" command.


So I ran "trac-admin /srv/trac/test-repo session list" while tractd is 
running, and this is what I got back

SID Auth Last Visit Name Email Default Handler
---------------------------------------------------

I think quit tracd and repeated the test. Same outcome. Is that the 
expected behaviour?

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/a622a6af-5abb-4309-badb-1b75cf844d03n%40googlegroups.com.

Reply via email to