Opened 10 years ago
Last modified 5 years 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: | |||
Internal 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 , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
Milestone: | next-dev-1.1.x → 1.1.4 |
---|
comment:3 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 10 years ago
Milestone: | 1.1.4 → 1.1.5 |
---|
comment:5 by , 10 years ago
Milestone: | 1.1.5 → 1.2 |
---|
comment:7 by , 10 years ago
Milestone: | 1.1.6 → next-dev-1.1.x |
---|---|
Owner: | removed |
Status: | assigned → new |
comment:8 by , 9 years ago
Two design considerations:
- The
ExtensionPoint
needs to be called on aComponent
class. - The
ISessionAttributeProvider
needs to be implemented on a class insession.py
to declare the basic fields such asname
,email
, anddefault_handler
(though maybedefault_handler
should be moved toRequestDispatcher
).
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 , 9 years ago
Milestone: | next-dev-1.1.x → next-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 , 8 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.
comment:13 by , 5 years ago
Milestone: | next-dev-1.5.x → next-major-releases |
---|
Narrowing focus for 1.1.4.