Edgewall Software
Modify

Opened 11 years ago

Last modified 19 months 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
Release Notes:
API 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@… 11 years ago.
Removal of ROADMAP_ADMIN from Trac's repository @ 3179

Download all attachments as: .zip

Change History (18)

Changed 11 years ago by asmodai@…

Attachment: ROADMAP_ADMIN-removal.diff added

Removal of ROADMAP_ADMIN from Trac's repository @ 3179

comment:1 Changed 10 years ago by Christian Boos

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

Any objections to the patch?

comment:2 Changed 10 years ago by coderanger@…

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

comment:3 Changed 10 years ago by Christian Boos

Milestone: 0.100.11

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

comment:4 Changed 10 years ago by Christian Boos

Status: assignednew

comment:5 Changed 10 years ago by asmodai@…

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 Changed 10 years ago by Christian Boos

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 Changed 10 years ago by sid

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

comment:8 in reply to:  7 Changed 10 years ago by Matthew Good

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 Changed 10 years ago by sid

Yep, my mistake.

comment:10 Changed 9 years ago by Christian Boos

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 Changed 9 years ago by ThurnerRupert

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 Changed 9 years ago by osimons

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 Changed 9 years ago by Christian Boos

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 *

comment:14 in reply to:  12 Changed 9 years ago by Christian Boos

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 Changed 6 years ago by Christian Boos

Keywords: needmajor added

comment:16 Changed 2 years ago by Ryan J Ollos

Cc: Ryan J Ollos added

comment:17 Changed 19 months ago by Ryan J Ollos

Owner: Christian Boos deleted

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.