Project

General

Profile

Actions

Feature #17112

closed

Add file operation permissions for back-end user groups

Added by Steffen Stein about 17 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-03-12
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

It would be more convenient to configure fileoperation permissions in backend groups, not in backend users.

Necessary actions:

- Extend be_groups table by field fileoper_perms (BLOB)
- change typo3/tce_file.php, line 144 to fetch fileoper_perms from be_users table
(issue imported from #M5203)

Files

5203.diff (17.2 KB) 5203.diff Administrator Admin, 2008-08-30 19:56
5203_2.diff (18.2 KB) 5203_2.diff Administrator Admin, 2008-10-23 18:06
5203_3.diff (18.8 KB) 5203_3.diff Administrator Admin, 2008-10-31 15:16
5203_4.diff (18.9 KB) 5203_4.diff Administrator Admin, 2008-11-01 01:45
5203_5.diff (19 KB) 5203_5.diff Administrator Admin, 2008-11-01 01:50

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #20148: Backend admin cannot perform file operations in filelistClosedChristian Kuhn2009-03-09

Actions
Actions #1

Updated by Martin Kutschker about 17 years ago

Many options are defined in the groups and can be overridden by user settings. Simply moving won't do because of backwards compatibility.

Actions #2

Updated by Steffen Stein about 17 years ago

So I would propose:
- Extend be_groups table by field fileoper_perms (BLOB)
- edit typo3/tce_file.php around line 144 (v4.1) so that
if fileoper_perms are set in be_users
use those,
else
use fileoper_perms from be_groups

One could also think about more complex schemes such as default to group rights and "extend" them by user rights. Meaning: applicable rights are:

be_users.fileoper_perms | be_groups.fileoper_perms (bitwise OR)

Or - even more complex: introduce explicit deny options for rights, overriding an allow in any other group/ user setting. (I don't know if this is implemented anywhere in Typo3)

Actions #3

Updated by Thomas Mammitzsch over 16 years ago

some news about it? i think this is a must with a large number of BE users, too.

Actions #4

Updated by eventhorizon over 15 years ago

This is a must must! Please do us all a favor and let someone implement it.
I suppose it would not be very tricky.
Greetings to all
eventhorizon

Actions #5

Updated by Christian Kuhn over 15 years ago

+1 on the feature.

I will try to compile a patch.

Actions #6

Updated by Christian Kuhn over 15 years ago

Attached a patch to implement this feature.

Values of groups and user settings are OR'ed, so backwards compatibility is not broken.

- Added field fileoper_perms to be_groups table
- Added / adapted TCA, locallang and CSH stuff
- Added handling in t3lib/class.t3lib_userauthgroup.php to OR permissions of groups with user permissions
- Introduced function returnFileoperationPermissions() in t3lib/class.t3lib_userauthgroup.php
- Use returnFileoperationPermissions() instead of $BE_USER->user['fileoper_perms'] in core files

Actions #7

Updated by Christian Kuhn over 15 years ago

Attached a new patch:
- Renamed function returnFileoperationPermissions() to getFileoperationPermissions()
- As discussed with Stucki and Masi the database defaults for both users
and groups file permissions are 0, the default TCA permissions for new
records moved from users to groups (new users get 0 instead of 7 and new
groups get 7 by default).
- Added an entry in NEWS.txt to document above change.
- Fixed a missing comma in TCA['be_groups']['types']['0'].

Actions #8

Updated by Daniel Krupke over 15 years ago

The patch doesn't work right for me. The "OR"-merging has to be fixed.

Example 1:

User: U
Group: G
U is in group G.

User has the following permissions:
- DIR: move, remove, rename, new
- DIR: copy
- DIR: delete recursively

Group has the following permissions:
- Files: upload, copy, move, remove, rename, new, edit
- Files: unzip

With the given permissions, a user should now be able to do all those things, because permissions are merged with OR.

But he can only do this things:
- DIR: move, remove, rename, new

Example 2:

User: S
Group: R
S is in group R.

S has no permissions.
R has all permissions.

Everything works for S.

Actions #9

Updated by Uschi Renziehausen over 15 years ago

I would love to have this feature very very much.

Uschi (poor admin of a site with many users)

Actions #10

Updated by Christian Kuhn over 15 years ago

Added 5203_3.diff:

- Use explicit cast to int to work correctly with bitwise OR operator (thanks to Daniel for pointing this out)
- Changed the install tool to add admin users with default 0 file permissions (admin has all rights anyway).

Patch is in the core list. Please test and vote.

Actions #11

Updated by Christian Kuhn over 15 years ago

5203_5.diff:

- Removed global declaration in tiny function getFileProcObj in typo3/sysext/impexp/class.tx_impexp.php and typo3/sysext/lowlevel/clmods/class.rte_images.php

Actions #12

Updated by Daniel Krupke over 15 years ago

I have tested the new attached patch (5203_5.diff) and everything works fine! I have tried many possible combinations of user and user group permissions and all of them worked like expected. So there is a +1 from me (none core member vote) on this patch for TYPO3 4.3.

Actions #13

Updated by Oliver Hader over 15 years ago

Committed to SVN Trunk (rev. 4579)

Actions

Also available in: Atom PDF