Edgewall Software
Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12227 closed enhancement (fixed)

Add trac-admin session promote command

Reported by: Ryan J Ollos Owned by: Jun Omae
Priority: normal Milestone: 1.0.10
Component: general Version:
Severity: normal Keywords: session
Cc: Branch:
Release Notes:

Added documentation on pre-populating the ticket assign-to field.

API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

When [ticket] restrict_owner = true, users aren't displayed in the ticket assign-to field (TracTickets#Assign-toasDrop-DownList) until they have authenticated with the project. As a workround, some admins choose to run a SQL query on the database to insert "known users". To help with this recurring issue we could extend the session set command or add a session promote command, either of which would effectively or directly execute Session.promote_session.

The issue was recently raised again in gmessage:trac-users:vKI_MDGL-Fs/EkAu9fiNCQAJ.

Attachments (0)

Change History (6)

comment:1 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 5 years ago

Description: modified (diff)

comment:3 by aikidoguy@…, 5 years ago

Thank you for considering this. I would very much like to see a command that could be run to add a user.

comment:4 by Jun Omae, 5 years ago

We can use session add to add session data without SQL query and a new command. I don't think need to add the new command.

Trac [/var/trac/1.0-sqlite]> help session add
session add <sid[:0|1]> [name] [email]

    Create a session for the given sid

    Populates the name and email attributes for the given session. Adding a
    suffix ':0' to the sid makes the session unauthenticated, and a suffix ':1'
    makes it authenticated (the default if no suffix is specified).

Trac [/var/trac/1.0-sqlite]> session add zzz:1
Trac [/var/trac/1.0-sqlite]>
$ sqlite3 /var/trac/1.0-sqlite/db/trac.db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from session where sid='zzz';
zzz|1|1444405511
sqlite> select * from session_attribute where sid='zzz';
sqlite>
Last edited 5 years ago by Jun Omae (previous) (diff)

comment:5 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.1.x1.0.10
Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Documentation added in TracTickets@75. I considered that a session set command would be useful for modifying the authenticated parameter of sessions that already exist in the database, however I'll wait to see if the functionality is really needed. The ability to set the session authenticated parameter might be more useful in the AccountManagerPlugin user management page, and for that matter I haven't looked closely to see if the capability already exists in AccountManager.

comment:6 by Ryan J Ollos, 5 years ago

Owner: set to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.