Edgewall Software
Modify

Opened 9 years ago

Last modified 7 weeks ago

#3022 new enhancement

Remove ROADMAP_ADMIN

Reported by: eblot Owned by:
Priority: normal Milestone: next-major-releases
Component: roadmap Version: 0.9.4
Severity: minor Keywords: permission needmajor
Cc: rjollos
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@… 9 years ago.
Removal of ROADMAP_ADMIN from Trac's repository @ 3179

Download all attachments as: .zip

Change History (18)

Changed 9 years ago by asmodai@…

Removal of ROADMAP_ADMIN from Trac's repository @ 3179

comment:1 Changed 9 years ago by cboos

  • Owner changed from cmlenz to cboos
  • Status changed from new to assigned

Any objections to the patch?

comment:2 Changed 9 years ago by coderanger@…

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

comment:3 Changed 9 years ago by cboos

  • Milestone changed from 0.10 to 0.11

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

comment:4 Changed 9 years ago by cboos

  • Status changed from assigned to new

comment:5 Changed 9 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 9 years ago by cboos

  • Severity changed from trivial to minor

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 follow-up: Changed 9 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 9 years ago by mgood

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

Yep, my mistake.

comment:10 Changed 8 years ago by cboos

  • Milestone changed from 0.11.1 to 0.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 8 years ago by ThurnerRupert

  • Milestone changed from 0.11 to 0.11.1

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

comment:12 follow-up: Changed 7 years ago by osimons

  • Milestone changed from 0.11.1 to 0.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 7 years ago by cboos

  • Keywords permission added
  • Milestone changed from 0.11 to 0.12
  • Priority changed from lowest to normal

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 7 years ago by cboos

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 5 years ago by cboos

  • Keywords needmajor added

comment:16 Changed 12 months ago by rjollos

  • Cc rjollos added

comment:17 Changed 7 weeks ago by rjollos

  • Owner cboos 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.