summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/group.py
Commit message (Collapse)AuthorAgeFilesLines
* Py3: Replace six.string_types with strChristian Heimes2018-09-271-1/+1
| | | | | | | | In Python 3, six.string_types is just an alias for str. See: https://pagure.io/freeipa/issue/7715 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* group: allow services as members of groupsAlexander Bokovoy2018-05-081-6/+13
| | | | | | | | | | | | | Allow services to be members of the groups, like users and other groups can already be. This is required for use cases where such services aren't associated with a particular host (and thus, the host object cannot be used to retrieve the keytabs) but represent purely client Kerberos principals to use in a dynamically generated environment such as Kubernetes. Fixes: https://pagure.io/freeipa/issue/7513 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* group-del: add a warning to logs when password policy could not be removedAlexander Bokovoy2018-05-031-0/+13
| | | | | | | | | | | | | | | | | | | When a user with sufficient permissions creates a group using ipa group-add and then deletes it again with group-del ipa gives an Insufficient access error, but still deletes the group. This is due to a need to remove an associaed password policy for the group. However, a password policy might be inaccessible to the user (created by a more powerful admin) and there is no way to check that it exists with current privileges other than trying to remove it. Seeing a Python exceptions in the Apache log without explanation is confusing to many users, so add a warning message that explains what happens here. Fixes: https://pagure.io/freeipa/issue/6884 Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
* LGTM: raise handle_not_found()Christian Heimes2018-01-091-7/+17
| | | | | | | | | | | | | | Turn calls "handle_not_found()" into "raise handle_not_found()" to indicate control flow chance. It makes the code easier to understand, the control flow more obvious and helps static analyzers. It's OK to raise here because handle_not_found() always raises an exception. https://pagure.io/freeipa/issue/7344 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
* Remove the `message` attribute from exceptionsStanislav Laznicka2017-10-061-1/+1
| | | | | | | | | This is causing python2 tests print ugly warnings about the deprecation of the `message` attribute in python2.6. https://pagure.io/freeipa/issue/7131 Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* Reworked the renaming mechanismStanislav Laznicka2017-03-271-1/+1
| | | | | | | | | | | | | | | | | | | The rename operation on *_mod commands was only allowed when the primary key of an entry was also its RDN. With these changes, it should be possible to rename the rest of the entries as well. An attribute to the base LDAPObject was added to whitelist the objects we want to allow to be renamed. It replaced an old attribute rdn_is_primary_key which was used for the very same purpose but the name was confusing because it was not set correctly for certain objects. https://pagure.io/freeipa/issue/2466 https://pagure.io/freeipa/issue/6784 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* permissions: add permissions for read and mod of external group membersPetr Vobornik2017-03-131-0/+17
| | | | | | | | Issue: "User Administrator" role cannot add users to an External Group. https://fedorahosted.org/freeipa/ticket/5504 Reviewed-By: Martin Basti <mbasti@redhat.com>
* remove trailing newlines form python modulesMartin Babinsky2016-10-121-1/+0
| | | | | | | | | pylint-1.6.4-1.fc26.noarch reports these, hence they should be fixed in order to build FreeIPA with this version https://fedorahosted.org/freeipa/ticket/6391 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Remove unused variables in the codeMartin Basti2016-09-271-1/+1
| | | | | | | | | | | This commit removes unused variables or rename variables as "expected to be unused" by using "_" prefix. This covers only cases where fix was easy or only one unused variable was in a module Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* pylint: fix unneeded-notJan Barta2016-09-221-2/+2
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* Use constant for user and group patternsMartin Basti2016-09-201-1/+2
| | | | | | | | | | User and groups regexp are the same and constant should be used to avoid any future misconfigurations. https://fedorahosted.org/freeipa/ticket/5822 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Fix regexp patterns in parameters to not enforce lengthMartin Basti2016-09-201-1/+1
| | | | | | | | | | | Regexp should not enforce lenght of string, we have different checks for that. Secondly regexp with length specified produces an incorrect error message. https://fedorahosted.org/freeipa/ticket/5822 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* frontend: don't copy command arguments to output paramsJan Cholasta2016-06-201-9/+10
| | | | | | | | | | | | | | Use only object params and params defined in has_output_params as output params. This removes unnecessary duplication of params defined both in object plugins and as command arguments. This requires all command output params to be properly defined in either the object plugins or the command's has_output_params. Fix the plugins where this wasn't true. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipalib: move server-side plugins to ipaserverJan Cholasta2016-06-031-0/+690
Move the remaining plugin code from ipalib.plugins to ipaserver.plugins. Remove the now unused ipalib.plugins package. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>