Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#873 closed defect (fixed)

trac-admin will not remove users from permission groups

Reported by: trac@… Owned by: Christopher Lenz
Priority: normal Milestone: 0.8
Component: admin/console Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

trac-admin allows to add lower case permission, but is not able to delete these permissions again. Looking in the source the first problem seems to be a simple typo.

    def _do_permission_add(self, user, action):
        if not action.islower() and not action.isupper():
            print 'group-names must be in lower case and permissions in upper case'
            return
        self.db_execsql("INSERT INTO permission VALUES('%s', '%s')" % (user, action))

The term action.islower() should read user.islower().

The second problem is related to the first, since all actions are forced to be upper case. So the question is, wether there should be a sanity check to be able to recover from wrong entries. Right now, the wrong entry can only be removed via direct access to the database.

Attachments (0)

Change History (3)

comment:1 by Christopher Lenz, 20 years ago

Owner: changed from daniel to Christopher Lenz
Status: newassigned

The problem isn't actually that check, but the _do_permission_remove() function.

Changeset [755] added a simple hack that allows permission groups (see also TracPermissions). You can add users to groups by passing an all-lower-case action to permission add. The check you mentioned actually only verifies that the action is either all lower-case (in which case it's actually a group name) or all upper-case (in that case it's an action).

comment:2 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [1008].

comment:3 by Christopher Lenz, 20 years ago

Summary: trac-admin adds lower case permissionstrac-admin will not remove users from permission groups

Updated subject to help avoid dups.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


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