Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11737 closed defect (fixed)

Remove mixed Tab/Space from source

Reported by: Chris W. Owned by: Chris W.
Priority: normal Component: TracPermissionFilterPlugin
Severity: trivial Keywords:
Cc: Trac Release: 0.12



I noticed that in line 74 of file tabs are used for indentation while the rest of the file uses spaces. The code works (well, I hope, not yet tested...) but it's really confusing when your editor is set to tabs=4 spaces.

I inserted comments in the code snippet below instead of providing a patch file.

    def check_permission(self, action, username, resource, perm):
        _admin = False
        if self.adminmeta:
            if action == 'TRAC_ADMIN':
        return # <-- This line has 2 tabs
            elif 'TRAC_ADMIN' in perm:
                _admin = True # <-- This line has 16 spaces
        if self.blacklist and len(self.blacklist) != 0:
            if not _admin and action in self.blacklist:
                return False
        if self.whitelist and len(self.whitelist) != 0:
            if not _admin and action not in self.whitelist:
                return False

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 13912:

Fixed indentation and replaced tabs with spaces. Fixes #11737.

comment:2 Changed 4 years ago by Ryan J Ollos

Owner: changed from Sergio Talens-Oliag to Chris W.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Chris W..
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.