Johannes Meyer
5dfa5e28da
User: Add property `$unrestricted`
2021-03-09 11:27:13 +01:00
Johannes Meyer
cc65164a67
Adjust global permissions
2021-02-18 11:11:39 +01:00
Johannes Meyer
6eb0139446
User: Move `$user:local_name$` handling to class `AdmissionLoader`
...
This way it also adjusts the roles directly, and not just their
copies for the user object
2021-02-18 11:11:39 +01:00
Johannes Meyer
87d741265e
Auth: Add support for denied permissions
2021-02-18 11:11:39 +01:00
Johannes Meyer
c0541d70e9
Move permission match code from class `User` to `Role`
2021-02-18 11:11:39 +01:00
Johannes Meyer
8519bb5d11
User: Don't return true if any permission is granted and `*` is required
2019-12-05 08:44:33 +01:00
Oliver Rahner
6ad74ef1cc
renamed variable $currentUser$ to $user:local_name$
...
updated docs, too
2019-06-03 23:56:21 +02:00
Oliver Rahner
34eadb7f29
Enable `$currentUser` placeholder in restrictions
...
implements #3493
2018-08-08 15:15:02 +02:00
Johannes Meyer
22feb4b3fd
User: Allow to unset an email and return $this in all setters
...
$email is optional in the constructor and so should be when
calling its setter.
2017-07-31 15:21:54 +02:00
Eric Lippmann
d05a262819
Auth: Protect User::setDomain() from empty strings
2017-07-11 16:56:35 +02:00
Eric Lippmann
8fbde51b5f
Throw an exception in User::getDomain() if the user does not have a domain
...
refs #2153
2017-06-12 13:31:07 +02:00
Alexander A. Klimov
2b9e9bf2b3
User: split the username into localpart and domain (if given)
2017-06-12 13:31:07 +02:00
Eric Lippmann
3d6ae6ac26
Fix PHPDoc of User::setRestrictions()
...
refs #10887
2016-03-29 11:25:39 +02:00
Alexander A. Klimov
c6eb3cd2c7
Add missing User::$roles definition
...
refs #10887
2016-03-24 16:34:32 +01:00
Eric Lippmann
1aa42bdaf6
lib: Add User::getRoles() and ::setRoles()
...
refs #10887
2016-03-24 15:30:07 +01:00
Alexander A. Klimov
474803fee4
Change all license headers to only reflect a file's year of creation
...
refs #11000
2016-02-08 15:41:00 +01:00
Johannes Meyer
6a61d4aa25
User: Fix method getNavigation()
...
refs #10246
2015-09-30 11:47:38 +02:00
Johannes Meyer
037fee298b
User: Drop method loadNavigationConfig()
...
refs #10246
2015-09-30 11:38:14 +02:00
Johannes Meyer
bb4f4e9095
User: Properly load menu items
...
refs #5600
2015-09-17 13:40:58 +02:00
Johannes Meyer
6a00eaf34d
User: Add method loadNavigationConfig()
...
refs #5600
2015-09-07 14:01:28 +02:00
Johannes Meyer
a012595e3d
User: Add method getNavigation()
...
refs #5600
2015-09-07 12:19:54 +02:00
Johannes Meyer
f90f7b1528
User: Consider the shortest wildcard permission more important
...
I hope we do not need a fourth attempt to get this right...
fixes #10016
2015-08-27 14:24:04 +02:00
Eric Lippmann
775f8cced6
lib: Introduce User::$isHttpUser
...
refs #9660
2015-07-30 09:31:58 +02:00
Eric Lippmann
e7c7486097
lib: Fix PHPDoc in User
...
refs #9660
2015-07-29 15:46:53 +02:00
Eric Lippmann
1b5c5deace
lib: Rename remote user to external user
...
We renamed our backend. Code now reflects this.
refs #9660
2015-07-29 15:44:32 +02:00
Johannes Meyer
267e71f38b
User: Consider the required permission more important if it has a wildcard
...
refs #9202
2015-06-02 12:01:02 +02:00
Alexander Fuhr
612fefba9c
Fix the permission wildcards assertion
...
fixes #9202
2015-05-05 12:36:26 +02:00
Eric Lippmann
7f010102f6
Add wildcard support to the permission passed to User::can()
...
refs #8720
2015-03-12 15:45:25 +01:00
Eric Lippmann
6bae2e0a53
Note that our license is GPL v2 or any later version in our license header instead of pointing to the license's URL
2015-02-04 10:52:27 +01:00
Eric Lippmann
5b4fab0750
Add license header
...
This time without syntax errors hopefully :)
2015-02-03 16:27:59 +01:00
Eric Lippmann
5fa2e3cfdc
Revert "Add license header"
...
This reverts commit 338d067aba
.
2015-02-03 16:16:26 +01:00
Eric Lippmann
338d067aba
Add license header
...
fixes #7788
2015-02-03 15:51:04 +01:00
Eric Lippmann
94193abdc0
lib: Fix User::can()
2015-02-02 14:16:26 +01:00
Eric Lippmann
9ac9342107
Revert "lib: Reduce else { if { to elseif { in User::can()"
...
This reverts commit e5b0b52874
.
2015-02-02 14:16:26 +01:00
Eric Lippmann
e5b0b52874
lib: Reduce else { if { to elseif { in User::can()
2015-01-30 11:20:05 +01:00
Eric Lippmann
f16aac5154
Security: Sort permissions only if not empty
2015-01-22 15:20:19 +01:00
Matthias Jentsch
8eb7db9b35
Avoid type warning when using array_combine on empty arrays
2014-09-30 15:54:38 +02:00
Eric Lippmann
c51b05296e
Merge branch 'master' into bugfix/commands-6593
2014-09-19 13:18:47 +02:00
Eric Lippmann
854e284d42
autologin: Don't use `count()' for is empty checks
...
Using `count()' in favor of `empty()' for empty checks on arrays is bad habit.
While there's literally no performance gain in the "fixed" scenario, there's one on large arrays
and thus should be avoided everywhere.
refs #6462
2014-09-18 15:18:01 +02:00
Eric Lippmann
af58732545
Introduce `User::can()' for checking whether a user has a given permission
...
The authentication manager already has the `hasPermission()' method but it lacks wildcard support
and uses stupid looping. Implementing this method on the user further saves a call to `User::getPermissions()'.
2014-09-18 14:37:18 +02:00
Johannes Meyer
1ba3df310c
Remove BaseConfigController, User\Message and Widget\AlertMesageBox
...
refs #6758
2014-09-02 16:25:03 +02:00
Marius Hein
e2c761a7aa
AutoLogin/Logout: Remove own session namespace
...
Store data in the user and implement interface to left
backends store remote information.
fixes #6461
2014-07-30 12:35:55 +02:00
Johannes Meyer
3105c2059e
Remove license headers from all files
...
refs #6309
2014-07-15 13:43:52 +02:00
Johannes Meyer
be410a685b
Add test for Icinga\User
...
refs #6011
2014-04-28 14:06:39 +02:00
Thomas Gelf
0ecf01cae8
Deliver empty preferences unless we configured such
2014-03-04 10:14:20 +00:00
Marius Hein
8a604f1c2c
Implement structures for permissions, restrictions and membership
...
refs #4624
2014-02-12 17:03:18 +01:00
Johannes Meyer
ac0b041523
Remove session handling from the authentication manager
...
refs #5510
2014-01-24 14:44:19 +01:00
Thomas Gelf
6ef87f4644
Example showing restriction usage in the monitoring module
...
fixes #4108
2014-01-22 13:34:39 +00:00
Thomas Gelf
0f565aae6a
Added permission handlers and related sample config reader
...
Please see feature #4108 for sample usage
refs #4108
2014-01-22 13:06:59 +00:00
Marius Hein
f7324e73a3
User class bugfix
...
refs #5151
2013-11-28 17:31:41 +01:00