summaryrefslogtreecommitdiffstats
path: root/ipalib/parameters.py
Commit message (Collapse)AuthorAgeFilesLines
* Add option to only prompt once for passwords, use in entitle_registerRob Crittenden2011-08-241-0/+4
| | | | | | | | | A Password param always prompted to confirm the entered password. This doesn't make sense if you want to prompt for a password to another system like we do with entitlements. This adds a new boolean option to control the Password prompt parameter. https://fedorahosted.org/freeipa/ticket/1695
* Revert use of 'can be at least' to 'must be at least' in minvalue validatorRob Crittenden2011-07-261-1/+1
| | | | BZ https://bugzilla.redhat.com/show_bug.cgi?id=723969
* Don't check for leading/trailing spaces in a File parameterRob Crittenden2011-07-251-1/+2
| | | | https://fedorahosted.org/freeipa/ticket/1505
* Set a default minimum value for class Int, handle long values better.Rob Crittenden2011-07-191-27/+34
| | | | | | | Allow a long to get as far as the min/max constraints where we can compare it to min/max int values and reject with a proper error message. https://fedorahosted.org/freeipa/ticket/1494
* Improve long integer type validationMartin Kosek2011-07-181-0/+24
| | | | | | | | | Passing a number of "long" type to IPA Int parameter invokes user-unfriendly error message about incompatible types. This patch improves Int parameter with user understandable message along with maximum value he can pass. https://fedorahosted.org/freeipa/ticket/1346
* Convert nsaccountlock to always work as bool towards Python codeAlexander Bokovoy2011-07-131-2/+2
| | | | | | | | https://fedorahosted.org/freeipa/ticket/1259 Python code will see nsaccountlock as bool. JavaScript code will also see it as bool. This allows native boolean operations with the lock field. Passes both CLI and WebUI tests.
* Fixed object_name and object_name_plural internationalizationEndi S. Dewata2011-07-121-1/+1
| | | | | | | | | The object_name, object_name_plural and messages that use these attributes have been converted to support translation. The label attribute in the Param class has been modified to accept unicode string. Ticket #1435
* Enforce class rules when query=True, continue to not run validators.ticket-hbac-testRob Crittenden2011-07-111-4/+19
| | | | | | | | | | | | | | | This started as a problem in allowing leading/trailing whitespaces on primary keys. In nearly every command other than add query is True so all rules were ignored on the primary key. This meant that to enforce whitespace we would need to define a validator for each one. I decided instead to set self.all_rules to just the class rules if query == True. So the minimum set of validators will be executed against each type but param-specific validators will only run on add. https://fedorahosted.org/freeipa/ticket/1285 https://fedorahosted.org/freeipa/ticket/1286 https://fedorahosted.org/freeipa/ticket/1287
* Convert Bool to TRUE/FALSE when working with LDAP backend ↵Alexander Bokovoy2011-06-271-2/+2
| | | | | | | | https://fedorahosted.org/freeipa/ticket/1259 According to RFC4517 the only valid values for a boolean in LDAP are TRUE or FALSE. This commit adds support to recognize TRUE and FALSE as valid Bool constants when converting from LDAP attribute values and enforces TRUE or FALSE string for account locking.
* Add backslash escape support for cvs readerJohn Dennis2011-06-221-1/+2
|
* JSON marshalling listAdam Young2011-06-101-1/+1
| | | | Lists are sometimes marshalled as arrays. Before, we assumed they were CSV strings.
* Fix uninitialized attributes.Jan Cholasta2011-04-211-0/+3
|
* Fix lint false positives.Jan Cholasta2011-04-131-1/+3
|
* Fix translatable strings in ipalib plugins.Pavel Zuna2011-03-011-2/+2
| | | | Needed for xgettext/pygettext processing.
* Remove deprecated i18n code from ipalib/request and all references to it.Pavel Zuna2011-03-011-1/+1
| | | | Ticket #903
* Convert json strings to unicode when they are unmarshalled.Rob Crittenden2011-02-111-27/+1
| | | | | | | | | This patch removes some individual work-arounds of converting strings to unicode, they only masked the problem. String values are not passed to the validator or normalizers so things like adding the realm automatically to services weren't happening. ticket 941
* Fix assorted bugs found by pylintJakub Hrozek2011-01-251-0/+7
|
* Set the default Int maxvalue to the maximum XML-RPC can handle.Rob Crittenden2011-01-181-1/+2
| | | | | | Also handle marshalling errors thrown by xmlrpclib more gracefully. ticket 770
* Support for str in StrEnum.Endi S. Dewata2011-01-131-0/+18
| | | | | The StrEnum class has been modified to accept str value and convert it into unicode. This is to fix encoding issue on F14.
* Retype (when cloning) Flag parameters to Bool for search commands.Pavel Zuna2011-01-101-1/+7
| | | | | | | | | Flag parameters are always autofill by definition, causing unexpected search results. This patch retypes them to Bool for search commands, so that users have to/can enter the desired value manually. Ticket #689 Ticket #701
* Fix webUI command parameters error on Fedora 14.Pavel Zuna2010-12-221-1/+9
|
* Fix reporting of errors when validating parameters.Pavel Zuna2010-12-211-1/+4
| | | | | | | | | | | | | | | | | | Print the attribute CLI name instead of its 'real' name. The real name is usually the name of the corresponding LDAP attribute, which is confusing to the user. This way we get: Invalid 'login': blablabla instead of: Invalid 'uid': blablabla Another example: Invalid 'hostname': blablabla instead of: Invalid 'fqdn': blablabla Ticket #435
* Change FreeIPA license to GPLv3+Jakub Hrozek2010-12-201-5/+5
| | | | | | | | | | The changes include: * Change license blobs in source files to mention GPLv3+ not GPLv2 only * Add GPLv3+ license text * Package COPYING not LICENSE as the license blobs (even the old ones) mention COPYING specifically, it is also more common, I think https://fedorahosted.org/freeipa/ticket/239
* Allow RDN changes from CLIJakub Hrozek2010-12-201-1/+7
| | | | https://fedorahosted.org/freeipa/ticket/397
* Add new parameter type IA5Str and use this to enforce the right charset.Rob Crittenden2010-12-071-0/+19
| | | | ticket 496
* This is the second half of a patch. Only the part that had to beRob Crittenden2010-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | re-based got pushed for some reason. Use better description for group names in help and always prompt for members When running <foo>-[add|remove]-member completely interactively it didn't prompt for managing membership, it just reported that 0 members were handled which was rather confusing. This will work via a shell if you want to echo too: $ echo "" | ipa group-add-member g1 This returns 0 members because nothing is read for users or group members. $ echo -e "g1\nadmin\n" | ipa group-add-member This adds the user admin to the group g1. It adds it as a user because user membership is prompted for first. ticket 415
* Output ACI's broken out into attributes rather than a single text fieldRob Crittenden2010-11-041-1/+10
| | | | | | Also add validation to the List parameter type. ticket 357
* Use context to decide which name to return on RequirementsErrorsRob Crittenden2010-10-281-5/+12
| | | | | | | | | | | | | | When a Requirement fails we throw an exception including the name of the field that is missing. To make the command-line friendlier we have a cli_name defined which may or may not match the LDAP attribute. This can be confusing if you are using ipalib directly because the attribute name missing may not match what is actually required (desc vs description is a good example). If you use the context 'cli' then it will throw exceptions using cli_name. If you use any other context it will use the name of the attribute. ticket 187
* Big webUI patch.Pavel Zuna2010-09-171-0/+1
| | | | | | | | | | | | | Quick summary: - use jQuery UI and jQuery BBQ libraries - code restructuring The patch has so many changes they can't be listed here. Many parts of the code have been rewritten from scrach. See freeipa-devel mailing list: webUI code restructuring [wall of text, diagrams, ... you've been warned!] 2010-09-07
* Improve serialization to JSON.Pavel Zuna2010-08-121-0/+14
| | | | | | - Make it recursive. - Make Param classes serializable. - Take python native data types into account.
* Add optional error message to pattern validatorRob Crittenden2010-08-061-3/+9
| | | | | | | | | The pattern validator by default displays the pattern that is being matched against. This isn't helpful, particularly for very hairy patterns. This adds a new parameter, pattern_errmsg, that is displayed on errors if set. ticket #11
* Increase supported weeks per month from 4 to 6 in AccessTime() typeRob Crittenden2010-06-031-1/+1
|
* Add weekly periodic schedule to AccessTime param type.root2010-05-041-0/+2
| | | | Fix bug #588414
* Add test cases for AccessTime param and fix some problems in AccessTimeRob Crittenden2010-05-031-4/+10
|
* Finish deferred translation mechanismJason Gerard DeRose2010-03-161-3/+3
|
* When raising an error about a required attribute, use cli_name not name.Rob Crittenden2010-03-071-1/+1
| | | | name is an LDAP attribute and may not be easily identifiable (e.g. sn).
* Translatable Param.label, Param.docJason Gerard DeRose2010-02-241-10/+81
|
* Fix bug where parameter cloning didn't clone validation rules.Pavel Zuna2010-02-231-1/+1
|
* Don't iterate over empty values in List paramsRob Crittenden2010-02-171-1/+1
|
* Allow one-character Param namesRob Crittenden2010-02-121-4/+0
| | | | This is done explicitly to support the l/localityname attribute.
* Take 2: Extensible return values and validation; steps toward a single ↵Jason Gerard DeRose2009-12-101-12/+10
| | | | output_for_cli(); enable more webUI stuff
* Rename GeneralizedTime to AccessTime.Pavel Zuna2009-12-011-4/+4
|
* Fix Bool parameter type. It was impossible to set it to FALSE.Pavel Zuna2009-11-301-2/+4
|
* Reading INT parameter class should respect radix prefixJohn Dennis2009-11-231-0/+29
| | | | | | | | | | This modifies the original patch by including a unit test, handling floats when passed as unicode, and handling large magnitude values beyond maxint. The INT parameter class was not respecting any radix prefix (e.g. 0x) the user may have supplied. This patch implements _convert_scalar method for the Int class so that we can pass the special radix base of zero to the int constructor telling it to determine the radix from the prefix (if present).
* _convert_scalar() should throw an error if passed a tuple or listRob Crittenden2009-11-171-0/+12
| | | | | A parameter needs to have multivalue set in order to work on lists/tuples and even then _convert_scalar() will be sent one value at a time.
* Add 'File' parameter type.Pavel Zuna2009-11-061-0/+12
| | | | Accepts filenames and loads file contents as parameter value.
* Change Password param so (password, confirm_password) can be passed to ↵Jason Gerard DeRose2009-10-181-0/+9
| | | | _convert_scalar()
* Giant webui patch take 2Jason Gerard DeRose2009-10-131-4/+47
|
* Add HBAC plugin and introduce GeneralizedTime parameter type.Pavel Zuna2009-10-051-0/+166
|
* Remove parent_key parameter kwarg.Pavel Zuna2009-09-101-7/+4
| | | | Also replace a TYPE_ERROR with ValidationError.