Commit Graph
100 Commits
Author SHA1 Message Date
Pavel Zuna 509c772f13 Fix gidnumber option of user-add command.
Ticket #1127
2011-03-29 13:45:40 -04:00
Pavel Zuna b2a4f1c049 Update translation file (ipa.pot). 2011-03-18 14:59:34 -04:00
Pavel Zuna 64575a411b Use ldapi: instead of unsecured ldap: in ipa core tools.
The patch also corrects exception handling in some of the tools.

Fix #874
2011-03-03 14:04:34 -05:00
Pavel Zuna eb6b3c7afc Fix error in user plugin email normalizer for empty --setattr=email=.
ticket 1048
2011-03-03 14:01:22 -05:00
Pavel Zuna 1eb3033311 Final i18n unit test fixes. 2011-03-01 10:31:43 -05:00
Pavel Zuna fc842e3650 Use pygettext to generate translatable strings from plugin files.
This patch replaces xgettext with a custom pygettext to generate
translatable strings from plugin files in ipalib/plugins. pygettext
was modified to handle plural forms (credit goes to Jan Hendrik Goellner)
and had some bugs fixed by myself. We only use it for plugins, because
it's the only place where we need to extract docstrings for the built-in
help system.

I also had to make some changes to the way the built-in documentation
systems gets docstrings from modules for this to work.
2011-03-01 10:31:42 -05:00
Pavel Zuna 18dda28c56 Fix i18n related failures in unit tests. 2011-03-01 10:31:41 -05:00
Pavel Zuna f3de95ce99 Fix translatable strings in ipalib plugins.
Needed for xgettext/pygettext processing.
2011-03-01 10:31:40 -05:00
Pavel Zuna 8145952752 Translate docstrings. 2011-03-01 10:31:39 -05:00
Pavel Zuna bbc94034b0 Fallback to default locale (en_US) if env. setting is corrupt. 2011-03-01 10:31:37 -05:00
Pavel Zuna bfca99b420 Send Accept-Language header over XML-RPC and translate on server.
Fix #904
Fix #917
2011-03-01 10:31:37 -05:00
Pavel Zuna 6eb70ea8e2 Remove deprecated i18n code from ipalib/request and all references to it.
Ticket #903
2011-03-01 10:31:36 -05:00
Pavel Zuna fd0a6b4849 Fix setattr mail bug in user plugin.
The email normalizer expects a list or tuple, but when using setattr
it gets a string and interates on it as if it was a list/tuple.
2011-02-15 14:42:58 -05:00
Pavel Zuna bfe33760d1 Display error messages for failed manageby in service-add/remove-host.
Fix #830
2011-02-10 13:42:26 -05:00
Pavel Zuna c24725ed38 Update krbtpolicy doc to inform that restarting krb5kdc might be needed.
Fix #844
2011-02-10 11:16:58 -05:00
Pavel Zuna 46dbf0ae55 Fix crash in DNS installer.
Fix #927
2011-02-10 11:16:57 -05:00
Pavel Zuna acc437c5fe Update config doc to reflect that 0 is not allowed for search time limit.
Fix #837
2011-02-10 11:16:57 -05:00
Pavel Zuna ab7e702487 Set minimum for Kerberos policy max life and max renew.
Fix #847
2011-02-10 11:16:57 -05:00
Pavel Zuna 04ba37500b Fix minor bug in host-add logic.
Ticket #798
2011-02-02 10:47:55 -05:00
Pavel Zuna dba751758c Fix crash in ipa help for NO_CLI plugins.
Fix #854
2011-02-02 10:47:53 -05:00
Pavel Zuna 3dae8f18a6 Raise ValidationError when adding unallowed attribute to search fields.
Ticket #845
2011-01-26 11:39:02 -05:00
Pavel Zuna c9ab92f210 Add ldap2 method to retrieve allowed attributes for specified objectClasses.
ldap2.get_allowed_attribute(['posixuser'])

returns a list of unicode all lower case attribute names allowed
for the object class 'posixuser'
2011-01-26 11:38:58 -05:00
Pavel Zuna 0c2beda3f7 Fix crash when displaying values composed of white-space chars only in CLI.
Ticket #825
2011-01-24 22:44:15 -05:00
Pavel Zuna 5f4ac74563 Fix password/random logic in host plugin.
Fix #798
2011-01-18 12:46:53 -05:00
Pavel Zuna 74ad4f3d7d Fix updating of DNS records by the host plugin.
Fix #799
2011-01-18 12:46:53 -05:00
Pavel Zuna 687324c193 Remove SOA maximum parameters from DNS zone.
There's no such thing as "maximum" in SOA record RDATA format
according to RFC 1035 and there's also no such attribute in
the schema.

Fix #788
2011-01-18 12:46:53 -05:00
Pavel Zuna 2bb944bea7 Fix crash when building DN of host with name ending with period.
Fix #797
2011-01-18 12:46:53 -05:00
Pavel Zuna 1af89d0daa Retype (when cloning) Flag parameters to Bool for search commands.
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
2011-01-10 12:07:19 -05:00
Pavel Zuna 38c2656829 Fix 'ipa help permissions'; add 'dns' in allowed types. 2011-01-07 14:57:32 -05:00
Pavel Zuna 6e5b540db2 Translate IA5Str paramaters the editable text fields in the webUI.
Fix #684
2011-01-05 15:31:47 -05:00
Pavel Zuna bd44006911 Make it impossible to add an object as a member of itself in webUI.
Ticket #700
2011-01-05 13:21:00 -05:00
Pavel Zuna 2f2c67cb59 Improvements to enrollments in the webUI.
TAKE 1

- Enrollement links in the action panel are now sorted by relationships.
- You can only enroll members.
  (The webUI made the impression you can enroll parents as well, but it was
   broken.)
- When enrolling new members, you can choose not to display already enrolled
  ones. (On by default.)
- Couple cosmetic changes.
2011-01-04 21:56:38 -05:00
Pavel Zuna d6d579ead4 Improve filtering of enrollments search results.
This is required for effective filtering of enrollments search
results in the webUI and also gives an edge to the CLI.

After this patch, each LDAPObject can define its relationships
to other LDAPObjects. For now, this is used only for filtering
search results by enrollments, but there are probably more
benefits to come.

You can do this for example:

# search for all users not enrolled in group admins
ipa user-find --not-in-groups=admins

# search for all groups not enrolled in group global with user Pavel
ipa group-find --users=Pavel --not-in-groups=global

# more examples:
ipa group-find --users=Pavel,Jakub --no-users=Honza
ipa hostgroup-find --hosts=webui.pzuna
2011-01-04 21:56:38 -05:00
Pavel Zuna 3ded0826cf Disable action panel links when the selected entry is deleted.
Fix #685
2011-01-03 14:33:59 -05:00
Pavel Zuna f5a10bc2ec Update built-in help for user (ipa help user) with info about username format.
Ticket #436
2010-12-22 11:34:08 -05:00
Pavel Zuna e5ccddf446 Fix webUI command parameters error on Fedora 14. 2010-12-22 11:00:10 -05:00
Pavel Zuna 1a7f5e0cc4 Fix reporting of errors when validating parameters.
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
2010-12-21 12:57:41 -05:00
Pavel Zuna ec5fba6e67 Fix the mod operations. 2010-12-21 12:34:04 -05:00
Pavel Zuna 3a9210f06f Enable filtering search results by member attributes.
LDAPSearch base class has now the ability to generate additional
options for objects with member attributes. These options are
used to filter search results - search only for objects without
the specified members.

Example:
ipa group-find --no-users=admin

Only direct members are taken into account.

Ticket #288
2010-12-20 12:28:45 -05:00
Pavel Zuna 8bd9f1333f Fix search filter generator in ldap2 for NOT operator.
Search filters generated from attributes with multiple values
were incorrect when the NOT operator was used (ldap.MATCH_NONE).
2010-12-08 14:30:47 -05:00
Pavel Zuna bee5c1d174 Fix default attributes in config plugin (ipadefaultemaildomain).
Ticket #573
2010-12-07 16:41:06 -05:00
Pavel Zuna 5db7c4ec34 Add new version of DNS plugin: complete rework with baseldap + unit tests.
Ticket #36
Ticket #450
2010-12-01 21:32:09 -05:00
Pavel Zuna 94957c8ddc Prompt correctly for required Password params.
Ticket #361
2010-11-30 15:14:28 -05:00
Pavel Zuna a34bb67cbd Rename parent LDAPObject pkeys in child LDAPObject methods.
If the parent and child entries have the same attribute as primary
key (such as in the DNS schema), we need to rename the parent key
to prevent a param name conflict. It has no side effects, because
the primary key name is always taken from the LDAPObject params,
never from the method params.
2010-11-24 09:54:01 -05:00
Pavel Zuna 9120155dae Generate better DuplicateEntry error messages in LDAPCreate.
Ticket #530
2010-11-23 21:32:12 -05:00
Pavel Zuna 5060fdfade Change signature of LDAPSearch.pre_callback.
Add the opportunity to change base DN and scope in the callback.
2010-11-23 21:29:08 -05:00
Pavel Zuna dc34075fa5 Replace 'Locking' in ipa help user with 'Disabling'.
Ticket #452
2010-11-09 14:02:12 -05:00
Pavel Zuna 93290c8a72 Add LDAPObject setting to handle different attributes for RDN and PKEY. 2010-10-28 07:58:31 -04:00
Pavel Zuna 5dcf011363 Add fail-safe defaults to time and size limits in ldap2 searches. 2010-10-22 19:53:08 -04:00
Pavel Zuna 42c78a383d Add flag to group-find to only search on private groups.
ticket #251
2010-10-20 17:38:03 -04:00
Pavel Zuna dff2ff8300 Disallow RDN change and single-value bypass using setattr/addattr.
When setting or adding an attribute wiht setatt/addattr check to
see if there is a Param for the attribute and enforce the multi-value.
If there is no Param check the LDAP schema for SINGLE-VALUE.

Catch RDN mods and try to return a more reasonable error message.

Ticket #230
Ticket #246
2010-10-18 14:44:42 -04:00
Pavel Zuna 127ff317ce Fix attribute callbacks on details pages in the webUI.
Ticket #326
2010-10-06 17:01:45 -04:00
Pavel Zuna 8a2ea9a7e0 Fix inconsistent error message when deleting groups that don't exist.
Ticket #292
2010-10-06 10:01:59 -04:00
Pavel Zuna 6606b2a9c5 Rename user-lock and user-unlock to user-enable user-disable.
Ticket #165
2010-10-06 09:20:44 -04:00
Pavel Zuna 9832780414 Add 'continuous' mode to LDAPDelete. Fix *-del unit tests.
Ticket #321
2010-10-06 09:20:41 -04:00
Pavel Zuna bf053652bc Generate additional positional arguments for baseldap commands from takes_args. 2010-10-06 09:20:38 -04:00
Pavel Zuna c106922c13 Add Delete capabilities to Search facet in the WebUI.
Ticket #206
2010-10-01 10:00:10 -04:00
Pavel Zuna 838c1f2c94 Add LDAPMultiQuery base class and make it the base of LDAPDelete.
In other words: make *-del commands accept 1 or more primary keys
of entries to be deleted.

Ticket #20
2010-10-01 10:00:01 -04:00
Pavel Zuna fb133734cc Add jQuery UI and jQuery BBQ libraries to the project. 2010-09-17 19:42:40 -04:00
Pavel Zuna 1bb412239d Big webUI patch.
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
2010-09-17 19:42:40 -04:00
Pavel Zuna 02479babb9 Fix script tags in index.xhtml.
End tag is required by lite server.
2010-08-25 13:21:42 -04:00
Pavel Zuna 005cc2d365 Add webUI application to lite-server. 2010-08-25 13:06:15 -04:00
Pavel Zuna ead85f2866 Make changes to details.js. See commit message.
- Add/Remove links are now only available for multivalue
  attributes (Param.multivalue = true) and attributes with param
  types, that are multivalue by definition (as of now only List).
  Single-value attributes with no value are displayed as empty
  input elements.
- When updating an attribute, leading and trailing spaces are
  stripped
- Context help available in the form of hints, that are extracted
  form Param.hint.
2010-08-25 12:51:44 -04:00
Pavel Zuna 7a007d958b Fix Update function on details page.
The problem was that parameters with no values are automatically
set to None by the framework and it wasn't handled properly in
baseldap.py:get_attributes function. Also, there were two logical
bugs in details.js:
1) atttribute callback to update values were called for input elements
   instead of dt elements
2) it was always trying to update the primary key
2010-08-17 14:53:03 -04:00
Pavel Zuna 19466d499b Make user details work again in the webUI.
Unfortunately we can't have any javascript in *.inc files, because
the browser will strip them for security reasons. I moved all the
attribute callbacks etc. to the only logical place: user.js.

It's fine for now, but user.js is going to need some serious cleaning
up in the future.
2010-08-17 14:28:29 -04:00
Pavel Zuna b6776dacd4 Clean details.js.
What does it mean?
I removed duplicate code, that was pasted here from the user details page.

ipa_details_init doesn't call ipa_init anymore.

ipa_details_create takes a second optional parameter, that can be set to
a container element if we want to place the definition lists into a specific
element instead of <body>. In our case, we place stuff in <div id="content">
2010-08-17 14:28:00 -04:00
Pavel Zuna 6b63ab1c32 Clean ipa.js and make it load plugin meta-data over JSON-RPC.
What it means?
Well, first I removed some development control variables from ipa.js.
Namely useSampleData and sizelimit. I moved useSampleData to the top
of index.xhtml. This way we won't forget about it when we don't need
it anymore. sizelimit has nothing to do in ipa.js and be hardcoded
for ALL commands! Some don't have this parameter and could fail.

Since ipa_init now loads meta-data over JSON-RPC, we need to wait for
it to finish its job. That's why I put a second parameter to ipa_init:
on_win. ipa_init will call on_win when all data is loaded properly and
we can start building the page.
2010-08-17 14:26:36 -04:00
Pavel Zuna f15758dbea Improve serialization to JSON.
- Make it recursive.
- Make Param classes serializable.
- Take python native data types into account.
2010-08-12 09:06:22 -04:00
Pavel Zuna 58fd1199f6 Stretch content div and make Reset/Update buttons stick to right. 2010-08-12 09:05:18 -04:00
Pavel Zuna cc9d0ffc67 Fix bug: not found exc. handler was failing for singleton objects 2010-08-12 09:03:36 -04:00
Pavel Zuna 6136f773a9 Add new parameters to LDAPSearch: timelimit and sizelimit. 2010-08-12 09:02:39 -04:00
Pavel Zuna 5797c8167a Make LDAPObject classes JSON serializable. 2010-08-12 09:01:56 -04:00
Pavel Zuna 64490a3ee0 Correctly handle EmptyModlist exception in pwpolicy2-mod.
EmptyModlist exception was generated by pwpolicy2-mod when modifying
policy priority only. It was because the priority attribute is stored
outside of the policy entry (in a CoS entry) and there was nothing
left to be changed in the policy entry.

This patch uses the new exception callbacks in baseldap.py classes
to catch the EmptyModlist exception and checks if there was really
nothing to be modified before reraising the exception.
2010-05-14 11:07:10 -04:00
Pavel Zuna 7993719329 Add exception callback (exc_callback) to baseldap.py classes.
It enables plugin authors to supply their own handlers for
ExecutionError exceptions generated by calls to ldap2 made from
the execute method of baseldap.py classes that extend CallbackInterface.
2010-05-14 11:06:59 -04:00
root f6cde533fd Add new password policy plugin based on baseldap.py classes. 2010-05-05 15:00:04 -04:00
root a3d1b17559 Add weekly periodic schedule to AccessTime param type.
Fix bug #588414
2010-05-04 13:39:42 -04:00
Pavel Zuna a8409b7db1 Add file with example plugins/tutorial.
Note that this is still work in progress and will be finished
in another patch. Specifically, it currently doesn't cover baseldap.py
classes.
2010-04-27 16:33:08 -04:00
Pavel Zuna 44c1844493 Replace a new instance of IPAdmin use in ipa-server-install. 2010-04-27 16:29:36 -04:00
Pavel Zuna 3620135ec9 Use ldap2 instead of legacy LDAP code from v1 in installer scripts. 2010-04-19 11:27:10 -04:00
Pavel Zuna 34ee09e243 Fix ipa-dns-install. It was failing when DNS was reinstalling. 2010-04-19 11:38:40 +02:00
Pavel Zuna bc5b5a82d9 Fix DNS plugin: proper output definitions, --all, dns-add-rr overwritting
The DNS plugin is getting old, tired and already looking forward to his
pension in the Carribean. It will be replaced soon by a younger, faster,
safer, shorter (in terms of code) and more maintainable version.
Until that happens, here's some medicine for the old guy:
- proper output definitions: the DNS plugin was created before we
  had the has_output attribute in place
- --all: this is related to the output definitions as
  Command.get_options() adds the --all and --raw options automatically
  if has_output contains entries
- dns-add-rr overwritting: missing .lower() caused records to be
  overwritten everytime a new one was added from the CLI
2010-04-19 11:38:19 +02:00
Pavel Zuna 18349dda0f Enable LDAPObject subclasses to disable DN normalization in their methods. 2010-04-16 14:24:20 -04:00
Pavel Zuna 671bb9c978 Add interface for baseldap plugins to register additional callbacks. 2010-04-16 13:43:05 -04:00
Pavel Zuna e143c22d69 Fix output of env plugin. It displayed more than it should. 2010-04-16 11:06:54 -04:00
Pavel Zuna 2736177938 Add ipa man page. 2010-04-07 08:59:04 -04:00
Pavel Zuna 9dd082eb33 Fix http(s)_request in dogtag. Was blowing up because of unicode strings. 2010-03-30 15:11:56 -04:00
Pavel Zuna c7a35f95c5 Fix output for commands that do not return entries.
I also changed the default value of the print_all argument in
textui.print_entry from False to True. It think it makes more sense this
way, because:

1) if order is None, it will still print something
2) if order is not None, it will print what's in order first and then the
   rest
3) commands that care about the print_all argument have to set it in any
   case, those that don't care usually want to print everything
2010-03-26 16:56:47 -04:00
Pavel Zuna c9831d1cc6 Use ldap2.make_*dn* methods in pwpolicy plugin.
Fixes #572423.
2010-03-22 11:49:20 -04:00
Pavel Zuna 43ab2c483d Add INTERNAL flag to frontend plugins. If set, the plugin won't show in UI. 2010-03-22 10:41:36 -04:00
Pavel Zuna b0f302bd99 Provide more detailed NotFound error messages from baseldap classes. 2010-03-09 16:52:47 -05:00
Pavel Zuna 41312ca166 Code cleanup: remove unused stuff, take 1. 2010-03-01 16:53:30 -05:00
Pavel Zuna aa2c124e7d Make the --all option work in Add/Remove Member commands. 2010-02-24 14:56:34 -05:00
Pavel Zuna 6833a5e2b4 Complete netgroup attributes. 2010-02-23 17:54:54 -05:00
Pavel Zuna 5db8ebb48e Replace incorrect use of str.index with str.find in host plugin. 2010-02-23 17:54:52 -05:00
Pavel Zuna 899f318359 Fix bug where parameter cloning didn't clone validation rules. 2010-02-23 17:54:49 -05:00
Pavel Zuna 03f16810ee Use unicode instead of str for environmental variables in Env. 2010-02-19 14:38:58 -05:00
Pavel Zuna 93a09b2dd1 Make error message in migration plugin unicode. 2010-02-17 12:47:36 -05:00
Pavel Zuna c0c86232f4 Convert password policy integer values to unicode instead of str. 2010-02-17 10:56:11 -05:00
Pavel Zuna 3785ec49ab Convert integer and boolean values to unicode, don't leave them as str. 2010-02-17 10:56:08 -05:00
Pavel Zuna 03967f62e9 Auto-generate --all and --raw for commands, that return entries. 2010-02-17 10:56:06 -05:00