Edgewall Software
Modify

Opened 5 years ago

Last modified 11 days ago

#11840 new enhancement

Add ISessionAttributeProvider interface

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: next-major-releases
Component: general Version:
Severity: normal Keywords: session preferences
Cc: leho@… Branch:
Release Notes:
API Changes:

Description

It was described in comment:15:ticket:11612 how arbitrary data can be stored in session attributes by editing the client-side JavaScript in the browser. The proposed solution is to add a new interface for registering session attributes:

class ISessionAttributeProvider(Interface):

    def get_session_attribute_names():
        """Return a list of supported names in session attribute."""

    def validate_session_attribute(name, value):
        """Validate the given attribute.""""

Attachments (0)

Change History (13)

comment:1 by lkraav <leho@…>, 5 years ago

Cc: leho@… added

comment:2 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.1.x1.1.4

comment:3 by Ryan J Ollos, 5 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:4 by Ryan J Ollos, 5 years ago

Milestone: 1.1.41.1.5

Narrowing focus for 1.1.4.

comment:5 by Ryan J Ollos, 4 years ago

Milestone: 1.1.51.2

comment:6 by Ryan J Ollos, 4 years ago

Milestone: 1.21.1.6

Milestone renamed

comment:7 by Ryan J Ollos, 4 years ago

Milestone: 1.1.6next-dev-1.1.x
Owner: Ryan J Ollos removed
Status: assignednew

comment:8 by Ryan J Ollos, 4 years ago

Two design considerations:

  • The ExtensionPoint needs to be called on a Component class.
  • The ISessionAttributeProvider needs to be implemented on a class in session.py to declare the basic fields such as name, email, and default_handler (though maybe default_handler should be moved to RequestDispatcher).

Which class is appropriate? The only Component class in session.py is SessionAdmin. Adding the ExtensionPoint or implementing ISessionAttributeProvider on that class doesn't seem conceptually correct. Maybe it is okay for now though, until the session module grows additional functionality? We could add a new class, but what would it be called and what would be additional future responsibilities? Should it be SessionSystem?

comment:9 by Ryan J Ollos, 4 years ago

Milestone: next-dev-1.1.xnext-dev-1.3.x

Narrowing focus for milestone:1.2. Please move ticket to milestone:1.2 if you intend to fix it.

comment:10 by Ryan J Ollos, 2 years ago

TODO look at whether we could expand the TracAdmin session set command to cover all session attributes (e.g. pygments_style). Maybe that will be easier to do by adding the right interface.

Last edited 2 years ago by Ryan J Ollos (previous) (diff)

comment:11 by Peter Suter, 2 years ago

(Another use case could be configuring XMPP addresses.)

comment:12 by Ryan J Ollos, 5 weeks ago

Milestone: next-dev-1.3.xnext-dev-1.5.x

Milestone renamed

comment:13 by Ryan J Ollos, 11 days ago

Milestone: next-dev-1.5.xnext-major-releases

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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