Edgewall Software
Modify

Opened 19 years ago

Last modified 2 years ago

#3022 new enhancement

Remove ROADMAP_ADMIN

Reported by: Emmanuel Blot Owned by:
Priority: normal Milestone: next-major-releases
Component: roadmap Version: 0.9.4
Severity: minor Keywords: permission needmajor
Cc: Ryan J Ollos Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Tiny ticket to track the removal of ROADMAP_ADMIN (alias of MILESTONE_ADMIN) in the next release of Trac.

Attachments (1)

ROADMAP_ADMIN-removal.diff (3.9 KB ) - added by asmodai@… 19 years ago.
Removal of ROADMAP_ADMIN from Trac's repository @ 3179

Download all attachments as: .zip

Change History (18)

by asmodai@…, 19 years ago

Attachment: ROADMAP_ADMIN-removal.diff added

Removal of ROADMAP_ADMIN from Trac's repository @ 3179

comment:1 by Christian Boos, 18 years ago

Owner: changed from Christopher Lenz to Christian Boos
Status: newassigned

Any objections to the patch?

comment:2 by coderanger@…, 18 years ago

In the database upgrade script there should probably be a search-and-replace.

comment:3 by Christian Boos, 18 years ago

Milestone: 0.100.11

Well, ok for the search and replace, but I'll do that for 0.11, then.

comment:4 by Christian Boos, 18 years ago

Status: assignednew

comment:5 by asmodai@…, 18 years ago

UPDATE permission SET action = 'MILESTONE_ADMIN' WHERE action = 'ROADMAP_ADMIN'; should solve the case where a user does not yet have MILESTONE_ADMIN. The UNIQUE(username,action) will of course cause problems for this query, so it will need to become a bit smarter.

comment:6 by Christian Boos, 18 years ago

Severity: trivialminor

By first getting rid of the problematic rows?

DELETE FROM permission WHERE action = 'ROADMAP_ADMIN' 
 AND username IN (SELECT distinct(username) FROM permission 
                  WHERE action = 'MILESTONE_ADMIN');

UPDATE permission SET action = 'MILESTONE_ADMIN' 
WHERE action = 'ROADMAP_ADMIN';

comment:7 by sid, 18 years ago

If removing ROADMAP_ADMIN, should ROADMAP_VIEW also be removed? It's just an alias to MILESTONE_VIEW from what I can tell..

in reply to:  7 comment:8 by Matthew Good, 18 years ago

Replying to sid:

If removing ROADMAP_ADMIN, should ROADMAP_VIEW also be removed? It's just an alias to MILESTONE_VIEW from what I can tell..

ROADMAP_VIEW and MILESTONE_VIEW are separate permissions, though the reporter of #4292 also seemed to assume they were aliases. MILESTONE_VIEW only allows viewing individual milestones. ROADMAP_VIEW is required to actually view the "Roadmap" page.

comment:9 by sid, 18 years ago

Yep, my mistake.

comment:10 by Christian Boos, 17 years ago

Milestone: 0.11.10.11

Now that we have db21.py and hence an incompatible database_version between 0.10.x and 0.11, maybe we could do this one as well?

The current change is not important enough to justify a schema upgrade during 0.11.x, so it's either 0.11 or 0.12.

comment:11 by ThurnerRupert, 17 years ago

Milestone: 0.110.11.1

nobody touched it for more than 8 months, its not a bug, so it seems to block 0.11 unecessarily …

comment:12 by osimons, 17 years ago

Milestone: 0.11.10.11

I'm just setting milestone to 0.11 to get a decision on this. It does not make sense to do a db upgrade as part of a 0.11.x release, so either whatever should get done gets done before 0.11.0, or else it gets moved to 0.12.

My feeling is 0.12 simply because with the 0.11b1 out in the wild, it has just become too close to release for this version to introduce high-impact changes like database updates. I can't quite detect from above what actually needs to be done, the exact SQL needed, and the possible risks involved.

Do now or postpone?

comment:13 by Christian Boos, 17 years ago

Keywords: permission added
Milestone: 0.110.12
Priority: lowestnormal

Post-pone.

If we modify the permission table so that it takes into account the fine-grained permissions in 0.12, then we can also do that conversion as a special case.

Currently we have:

CREATE TABLE permission (
        username        text,           --
        action          text,           -- allowable activity
        UNIQUE(username,action)
);
cboos WIKI_VIEW
cboos ROADMAP_ADMIN

We could migrate to:

CREATE TABLE permission (
        username        text,           --
        action          text,           -- allowable activity
        realm           text,           -- resource realm
        id              text,           -- resource id
        UNIQUE(username,action,realm,id)
);
cboos wiki view *
cboos milestone admin *

in reply to:  12 comment:14 by Christian Boos, 17 years ago

Replying to osimons:

I forgot to say that I share your sentiment about doing a db upgrade in 0.11x at this point.

comment:15 by Christian Boos, 14 years ago

Keywords: needmajor added

comment:16 by Ryan J Ollos, 10 years ago

Cc: Ryan J Ollos added

comment:17 by Ryan J Ollos, 9 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
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.