Commit Graph

930 Commits

Author SHA1 Message Date
Petr Vobornik
9657c757f6 Add menu memory
Parent items remember last selected child.

https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:18 +02:00
Petr Vobornik
364e0ec5af File dependencies added to Web UI Makefile
WebUI was not rebuilt while rebuilding RPMS.

https://fedorahosted.org/freeipa/ticket/3235
2013-05-06 16:22:18 +02:00
Petr Vobornik
8751b1a3db Set pkeys to add,remove dialog
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:18 +02:00
Petr Vobornik
99fc3d597a Remove IPA.current_entity usage
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:18 +02:00
Petr Vobornik
a3e0e671a1 Fix nested facet search
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:17 +02:00
Petr Vobornik
31d7486b88 Remove IPA.nav usage, obsolete entity.get_primary_key
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:17 +02:00
Petr Vobornik
7edf044a44 Removed old navigation code
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:17 +02:00
Petr Vobornik
693dc56062 Menu and application controller refactoring
https://fedorahosted.org/freeipa/ticket/3235
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:17 +02:00
Petr Vobornik
a4d9e19c79 Config.js
https://fedorahosted.org/freeipa/ticket/3235
2013-05-06 16:22:17 +02:00
Petr Vobornik
87a1b58237 Phases - application lifecycle
https://fedorahosted.org/freeipa/ticket/3235
2013-05-06 16:22:17 +02:00
Petr Vobornik
33904d8651 i18n - internationalized text provider
https://fedorahosted.org/freeipa/ticket/3235
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:17 +02:00
Petr Vobornik
ded1bb3642 Basic implementation of registers
https://fedorahosted.org/freeipa/ticket/3235
2013-05-06 16:22:17 +02:00
Petr Vobornik
a31fe2739c Update of Dojo build
https://fedorahosted.org/freeipa/ticket/3235
https://fedorahosted.org/freeipa/ticket/3236
2013-05-06 16:22:17 +02:00
Petr Vobornik
f0c1c629d3 jsl update
https://fedorahosted.org/freeipa/ticket/3235
2013-05-06 16:22:16 +02:00
Petr Vobornik
80c4228fe2 Fix: Certificate status is not visible in Service and Host page
https://fedorahosted.org/freeipa/ticket/3593
2013-04-30 17:30:15 +02:00
Tomas Babej
e10d934230 Make gecos field editable in Web UI
This patch exposes user entry gecos field in Web UI.

https://fedorahosted.org/freeipa/ticket/3569
2013-04-25 17:27:10 +02:00
Ana Krivokapic
39982f6696 Remove HBAC source hosts from web UI
https://fedorahosted.org/freeipa/ticket/3528
2013-04-12 14:07:55 -04:00
Petr Vobornik
53dc8b3ec9 Fix regression in group type selection in group adder dialog
Refactoring of radio widget (04325fbb4c) caused that value is no longer supplied to value_change handler.
2013-04-10 09:28:15 +02:00
Petr Vobornik
617114aac4 Don't show trusts pages when trust is not configured
When trust is not configured trust-config page is raising an error. Trusts search page won't find anything either -> no use for the pages -> hiding.

https://fedorahosted.org/freeipa/ticket/3333
2013-04-10 09:28:04 +02:00
Petr Vobornik
7e088a8378 Global trust config page
https://fedorahosted.org/freeipa/ticket/3333
2013-04-10 09:24:46 +02:00
Petr Vobornik
3393c577f9 Run permission target switch action only for visible widgets
Permission details page was incorrectly evaluated as dirty (update button enabled) right after load when permission type={subtree,filter} and some attrs are set.

Can be reproduced by opening 'Modify Automount maps' permission.

The culprit is that attrs widget is populated and dirty-checked even targets where it doesn't belong.

Fixed by running target_mapping action only for visible targets.

https://fedorahosted.org/freeipa/ticket/3527
2013-04-05 10:44:44 +02:00
Petr Vobornik
5af3b146a3 Add ipakrbokasdelegate option to service and host Web UI pages
https://fedorahosted.org/freeipa/ticket/3329
2013-04-04 12:53:59 +02:00
Petr Vobornik
40b4faa6d7 Web UI: Disable cert functionality if a CA is not available
Part of the work for: https://fedorahosted.org/freeipa/ticket/3363
2013-04-02 15:32:05 +02:00
Petr Vobornik
661f41e197 Added Web UI support for service PAC type option: NONE
ipakrbauthzdata accepts [null, 'NONE', 'MS-PAC, 'PAD']

New nesting feature of radios/checkboxes was used to handle mutual exclusivity between
 ['MS-PAC', 'PAD'], 'NONE' and ''.

https://fedorahosted.org/freeipa/ticket/3404
2013-03-29 17:12:25 +01:00
Petr Vobornik
04325fbb4c Nestable checkbox/radio widget
New component: option_widget_base. It's not a regular widget but it share some of its characteristics. It should extend regular widget or it can be nested in itself alone.

checkbox_widget, checkboxes_widget, radio_widget were modified to use it.

Built as a prerequisite for:
https://fedorahosted.org/freeipa/ticket/3404
2013-03-29 17:12:20 +01:00
Petr Vobornik
790a576ad1 Fixed Web UI build error caused by rhino changes in F19
rhino-1.7R4-2.fc19.noarch dropped -main flag which made the build fail in rawhide (F19).

We can't use the same command for rhino-1.7R3-6 (F18) and rhino-1.7R4-2 (F19).
This patch adds check if rhino supports '-require' option. If so it calls rhino with it if not it calls rhino with -main option.

https://fedorahosted.org/freeipa/ticket/3501
2013-03-21 09:30:35 +01:00
Ana Krivokapic
6c85b88874 Realm Domains page
Add support for Realm Domains to web UI.

https://fedorahosted.org/freeipa/ticket/3407
2013-03-18 15:11:26 +01:00
Petr Vobornik
8d36951911 Web UI:Choose different search option for cert-find
This extends certificate search page by search option select. Therefore
the search is not restricted to 'subject'.

It should be replaced by https://fedorahosted.org/freeipa/ticket/191 in a
future.

https://fedorahosted.org/freeipa/ticket/3419
2013-03-18 15:11:18 +01:00
Petr Vobornik
070fc176ae Web UI:Certificate pages
Following pages were added to Web UI:
 * certificated details
 * certificate search

Certificate is not regular object so it gets no metadata. Therefore artificial
metadata were created for it to allow usage of search and details facet.

Search and details facet were modified to allow removing of add/remove/update/
reset buttons - certificates have no mod operation and they are not added by
standard means.

User can revoke and restore certificated in details facet.

https://fedorahosted.org/freeipa/ticket/3419
2013-03-18 15:11:08 +01:00
Sumit Bose
331856b13c Allow 'nfs:NONE' in global configuration
This patch adds 'nfs:NONE' as an allowed entry for the global
authorization data type in the CLI and WebUI. This is an ad-hoc solution
to make sure that the new default value for the NFS service is not
removed by chance.

This patch should be removed if a more generic solution is implemented
to modify service:TYPE style values of the authorization data type.

https://fedorahosted.org/freeipa/ticket/2960
2013-03-08 10:46:00 +01:00
Petr Vobornik
dc5fcc2969 Web UI: configurable SID blacklists
Added blacklists section, with ipantsidblacklistincoming and
ipantsidblacklistoutgoing multivalued textbox fields, into trust details page.

https://fedorahosted.org/freeipa/ticket/3289
2013-03-06 12:56:44 +01:00
Petr Vobornik
99421026f6 Fix handling of no_update flag in Web UI
There was an incorrect check for no_update flag. Check was performed as
if the flag was an attribute of object not an item of array. Hence, the
flag never caused any effect.
2013-03-06 12:55:54 +01:00
Petr Vobornik
86f24dab43 Fix dirty state update of editable combobox
Editable combobox didn't update it's dirty state correctly. CB had it's own
internal value changed event, which was incorrectly used. It was removed and
widget's value_changed event was used instead.
2013-03-06 12:55:27 +01:00
Petr Vobornik
32a7801cf4 Combobox keyboard support
Combobox can be controlled just by using keyboard.

When value list is closed, user can:
  * use UP and DOWN error to open list, it will focus the list and
    select previous/next value
  * when CB is non-editable, user can start typing, first character will open
    list, second will be entered into search input. Note: I wanted to copy the
    first char to the search box as well, but I did not figure out reliable
    method for converting keycode to char for non ASCII keyboard layouts
  * ESCAPE, ENTER, TAB keys are handled to allow keyboard operations in a
    container

When value list is opened:
  * CB tries to keep focus on either search input or a select
  * when focus is lost, the value list is closed. So  user can click anywhere
    on a page to close it - two comboboxes can't be opened on the same time
  * hitting TAB key switches between search and select
  * if CB is not searchable, hitting TAB will close the value list and select
    input textbox
  * hitting ESCAPE on will close the value list
  * hitting ENTER on search input will invoke search operation
  * hitting ENTER on select will close the value list
  * hitting UP/DOWN arrows will select previous/next values

Additional modifications:
  * opening arrow and search button were made non-focusable. It fixes the
    'wrong focus area' bug and simplifies keyboard usage. It doesn't affect
    mouse usage.

https://fedorahosted.org/freeipa/ticket/3324
2013-03-06 12:55:12 +01:00
Petr Viktorin
42300eb55b Rename the "messages" Output of the i18n_messages command to "texts"
This is to prevent a fatal name clash wih the new common "messages" Output.

Since i18n_messages is an internal plugin, the change does not affect
our public API.
2013-02-21 16:26:09 +01:00
Petr Vobornik
246bc3f3ea Web UI build profile updated
freeipa.profile was updated accordingly to contain all modules in dojo layer.

This change removes expected errors during the build and therefore it won't confuse others during rpm build. It also helps during development because developer will notice real dependency errors (those not specified this way).
2013-02-21 14:11:51 +01:00
Petr Vobornik
75eee33ed9 Allow to specify modules for which builder doesn't raise dependency error
One can specify module ids provided by other means (already built layer file) in providedMids array of build profile file's package section. Builder then ignores dependency errors for specified modules. This allows to build layers without source codes of their dependencies, with no expected errors raised.

Example:

packages:[
    {
        name: "freeipa",
        location: "freeipa",
        providedMids: [
            'dojo/_base/declare',
            'dojo/_base/lang',
            'dojo/_base/array',
            'dojo/Stateful'
            //etc
        ]
    }
],
2013-02-21 14:11:46 +01:00
Petr Vobornik
28551ae541 Develop.js extended
Develop.js contains code useful only for debugging. It is not part of FreeIPA
release.

Is loaded by typing require(['freeipa/develop']); in browser JS console.
It adds IPA global variable and provide easier way of loading AMD modules into
window.ipadev[providedNameOrModuleName] variable.

https://fedorahosted.org/freeipa/ticket/112
2013-02-21 14:11:43 +01:00
Petr Vobornik
5d919c9556 Change tests to use AMD loader
Test were modified accordingly to AMD changes.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:37 +01:00
Petr Vobornik
c71937fc0c Updated makefiles to build FreeIPA Web UI layer
Updated makefiles to comply to new directory structure and also to use builder
for building Web UI.

FreeIPA package spec is modified to use the output of the builder.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:37 +01:00
Petr Vobornik
5e90c98849 Change Web UI sources to simple AMD modules
Web UI sources were wrapped by AMD definition. Listed dependencies were changed
accordingly.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
e3ce3e4f39 AMD config file
Added configuration file for DOJO loader. Removal of JS links from index.html of
files which were changed to AMD modules.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
be0a120134 Update JavaScript Lint configuration file
Update is needed because various files were moved to different directories.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
b9ef6ab0c4 Move of core Web UI files to AMD directory
SSIA

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
8f8e790d94 Move of Web UI non AMD dep. libs to libs subdirectory
Third party JS libraries which are not AMD modules were moved to src/libs/
directory. Links in html files were changed accordingly.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
65301fe3f3 Web UI Sync development utility
Add util/sync.sh utility. It serves for copying source codes or compiled code
of Web UI to testing servers. Useful for development.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
92de64ec73 Web UI development environment directory structure and configuration
Added symbolic links which points to directories which should contain files of
Web UI layers. By changing those links we can switch between debugging (using
source codes) or testing (compiled version).

util/change-profile.sh utility serves for changing symbolic links in js/ dir
and therefore for switching between debugging and testing.

Default configuration for development is:
 * freeipa source files
 * libs as in git
 * compiled Dojo layer

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
217341560c Minimal Dojo layer
Added configuration files for building Dojo library and built library itself.

This configuration contains only modules currently needed.

make-dojo.sh script should be used for rebuilding the library when additional
modules or an update are needed.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:36 +01:00
Petr Vobornik
339790ec8e Config files for builder of FreeIPA UI layer
* Added package configuration and build profile of FreeIPA UI layer for
  Dojo Builder.
* Added script (util/make-ui.sh) which builds the layer

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:35 +01:00
Petr Vobornik
9d3364719d Dojo Builder
Added support for Dojo builder.

 * Includes built builder and patches required to build the builder.
 * _base/configRhino.js is required by the builder to run under rhino.
 * added utility scripts for running the builder
    * build.sh
    * clean.sh
    * compile.sh
    * make-builder.sh
    * prepare-dojo.sh

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:35 +01:00
Petr Vobornik
8c59ddbcbe Use Uglify.js for JS optimization
Uglify.js library was included in ui/util folder. A wrapper script
util/uglifyjs/uglify was created to run Uglify.js in Rhino enviroment.

https://fedorahosted.org/freeipa/ticket/112
2013-01-18 15:10:35 +01:00
Petr Vobornik
14b353b097 Focus first input element after 'Add and Add another'
When using 'Add and Add Another' button in entity adder dialog the dialog lose focus when an item is successfully added.

It caused by search dialog filter input. It gets focus in search facet's refresh. The refresh is happening when item is added.

This patch is disabling this focus and additionally is focusing first input element to allow imidiate definion of another item
2013-01-07 10:53:59 +01:00
Petr Vobornik
e433379c46 Standardize login password reset, user reset password and host set OTP dialogs
In all dialogs:
 * validation notification was standardized
 * can be confirmed by enter

User pwd dialog has fixed focus of first element.

https://fedorahosted.org/freeipa/ticket/2884
https://fedorahosted.org/freeipa/ticket/3200

Standartize password reset dialog
2013-01-07 10:53:58 +01:00
Petr Vobornik
3df18f5583 Confirm association dialogs by enter
Support for confirm mixin in association dialog.

https://fedorahosted.org/freeipa/ticket/3200
2013-01-07 10:53:58 +01:00
Petr Vobornik
731fce88a1 Focus last dialog when some is closed
When multiple dialogs is opened and one is closed the new top dialog doesn't recieve focus. It prevents from confirming/canceling the dialog using keyboard. This patch is fixing it.

https://fedorahosted.org/freeipa/ticket/3200
2013-01-07 10:53:58 +01:00
Petr Vobornik
7d457d521e Confirm error dialog by enter
Refactored error dialog and unauthorized dialog to support confirm mixin.

https://fedorahosted.org/freeipa/ticket/3200
2013-01-07 10:53:58 +01:00
Petr Vobornik
d14f76ef14 Confirm adder dialog by enter
Added confirm mixin support to entity adder dialog.

https://fedorahosted.org/freeipa/ticket/3200
2013-01-07 10:53:58 +01:00
Petr Vobornik
5bde270436 Confirm mixin
Base mixin class for dialogs witch confirmation/canceling capabilities.

When used, dialog can be 'confirmed' by 'enter' key or canceled by 'escape' key. It doesn't accept confirmation from all elements to not override default expected behavior like creating new line in text area, executing link or selecting a value in a select element.

https://fedorahosted.org/freeipa/ticket/3200
2013-01-07 10:53:58 +01:00
Petr Vobornik
b33f6acfa8 Make confirm_dialog a base class for message_dialog
https://fedorahosted.org/freeipa/ticket/3035
2013-01-07 10:53:58 +01:00
Petr Vobornik
c23dd23219 Make confirm_dialog a base class for deleter dialog
https://fedorahosted.org/freeipa/ticket/3035
2013-01-07 10:53:58 +01:00
Petr Vobornik
16663cb215 Make confirm_dialog a base class of revoke and restore certificate dialogs
https://fedorahosted.org/freeipa/ticket/3035
2013-01-07 10:53:58 +01:00
Petr Vobornik
8d892f442f Better error message for login of users from other realms
When user from other realm than FreeIPA's tries to use Web UI (login via forms-based auth or with valid trusted realm ticket), he gets an unauthorized error with X-Ipa-Rejection-Reason=denied. Web UI responds with showing login dialog with following error message: 'Sorry you
are not allowed to access this service.'.

Note: such users are not supported because they don't have a corresponding entry in LDAP which is needed for ACLs.

https://fedorahosted.org/freeipa/ticket/3252

denied change
2012-12-06 17:02:03 +01:00
Petr Vobornik
082bd0f69d Better licensing information of 3rd party code
README-LICENSE.txt file with licensing information of third party code used by
Web UI in production or development was added.

https://fedorahosted.org/freeipa/ticket/3281
2012-12-05 15:51:50 +01:00
Petr Vobornik
0833f594c1 Editable sshkey, mac address field after upgrade
After upgrade, sshkeys of existing users and hosts or mac address are not editable because attribute level rights are not send to Web UI due to lack of ipasshuser/ieee802device object classes.

'w_if_no_aci' attribute flag was introduced to bypass this issue. It makes attribute writable when AttributeLevelRights for the attribute are not present and only when user posses rights for modifying object class attribute.

The flag was set for sshkeys_field and mac address field.

https://fedorahosted.org/freeipa/ticket/3260
2012-11-29 09:38:04 +01:00
Petr Vobornik
730a500567 WebUI: Change of default value of type of new group back to POSIX
In FreeIPA 2.2, the default for group type was 'POSIX', in 3.0 it's 'normal' (non-posix). CLI's default is 'POSIX', Web UI should use 'POSIX' as well.

https://fedorahosted.org/freeipa/ticket/3270
2012-11-29 09:37:49 +01:00
Rob Crittenden
f1f1b4e7f2 Enable transactions by default, make password and modrdn TXN-aware
The password and modrdn plugins needed to be made transaction aware
for the pre and post operations.

Remove the reverse member hoop jumping. Just fetch the entry once
and all the memberof data is there (plus objectclass).

Fix some unit tests that are failing because we actually get the data
now due to transactions.

Add small bit of code in user plugin to retrieve the user again
ala wait_for_attr but in the case of transactions we need do it only
once.

Deprecate wait_for_attr code.

Add a memberof fixup task for roles.

https://fedorahosted.org/freeipa/ticket/1263
https://fedorahosted.org/freeipa/ticket/1891
https://fedorahosted.org/freeipa/ticket/2056
https://fedorahosted.org/freeipa/ticket/3043
https://fedorahosted.org/freeipa/ticket/3191
https://fedorahosted.org/freeipa/ticket/3046
2012-11-21 14:55:12 +01:00
Petr Vobornik
1bf537db9e Web UI: disable global forwarding per zone
Web UI part of 'disable global forwaring per zone' effort.

Option "Forwarding disabled" was added to 'DNS global config' and 'DNS zone' forwarding policy. It corresponds to 'none' value of idnsforwardpolicy.

https://fedorahosted.org/freeipa/ticket/3209
2012-11-09 17:46:04 +01:00
Petr Vobornik
445744206b Fixed incorrect link to browser config after session expiration
Fixed typo in message placeholder.

https://fedorahosted.org/freeipa/ticket/3187
2012-10-24 09:17:26 +02:00
Petr Vobornik
fed5bbd298 Simpler instructions to generate certificate
Instructions to generate certificate were simplified.

New instructions:

 1) Create a certificate database or use an existing one. To create a new database:
    # certutil -N -d <database path>
 2) Create a CSR with subject CN=<hostname>,O=<realm>, for example:
    # certutil -R -d <database path> -a -g <key size> -s 'CN=dev.example.com,O=DEV.EXAMPLE.COM'
 3) Copy and paste the CSR (from -----BEGIN NEW CERTIFICATE REQUEST----- to -----END NEW CERTIFICATE REQUEST-----) into the text area below:

https://fedorahosted.org/freeipa/ticket/3056
2012-10-19 14:30:06 +02:00
Alexander Bokovoy
6f45de10d7 support multi-line error messages in exceptions 2012-10-09 10:18:40 +02:00
Petr Vobornik
696fce5c8d Configuration pages changed to use new FF extension
browserconfig.html was changed to use new FF extension. The page is completely Firefox specific therefore the title was changed from 'Configure browser' to 'Firefox configuration'. Instruction to import CA cert in unauthorized.html are FF specific too, so they were moved to browserconfig.html. Unauthorized.html text was changed to distinguish FF config and other browsers. Now the page shows link for FF (browserconfig.html) and other browsers (ssbrowser.html). Ssbrowser.html should be enhanced by more configurations and browsers later [1].

Old configuration method was moved to ssbrowser.html.

Unauthorized dialog in Web UI now links to http://../unauthorized.html instead of https. This change is done because of FF strange handling of extension installations from https sites [2]. Firefox allows ext. installation from https sites only when the certificate is signed by some build-in CA. To allow custom CAs an option in about:config has to be changed which don't help us at all because we wants to avoid manual changes in about:config.

The design of browserconfig is inspired by Kyle Baker's design (2.1 Enhancements_v2.odt). It is not exactly the same. Highlighting of the steps wasn't used because in some cases we can switch some steps.

Ticket: https://fedorahosted.org/freeipa/ticket/3094

[1] https://fedorahosted.org/freeipa/ticket/823
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=688383
2012-10-04 18:08:26 -04:00
Petr Vobornik
26166deb0c Fix integer validation when boundary value is empty string
There was an error in number validation check. If boundary value was an empty string, validation of a number always failed. This patch fixes the problem by not performing the check in these cases.

https://fedorahosted.org/freeipa/ticket/3066
2012-09-19 11:09:09 +02:00
Petr Vobornik
e39a109060 Show trust status in add success notification
Web UI notification of 'Add verification step after trust creation'

https://fedorahosted.org/freeipa/ticket/2763
2012-09-17 21:24:38 -04:00
Petr Viktorin
4f76c143d2 Use Dogtag 10 only when it is available
Put the changes from Ade's dogtag 10 patch into namespaced constants in
dogtag.py, which are then referenced in the code.

Make ipaserver.install.CAInstance use the service name specified in the
configuration. Uninstallation, where config is removed before CA uninstall,
also uses the (previously) configured value.

This and Ade's patch address https://fedorahosted.org/freeipa/ticket/2846
2012-09-17 18:43:59 -04:00
Ade Lee
3dd31a8756 Modifications to install scripts for dogtag 10
Dogtag 10 uses a new installer, new directory layout and new default
ports.  This patch changes the ipa install code to integrate these changes.

https://fedorahosted.org/freeipa/ticket/2846
2012-09-17 18:43:36 -04:00
Yuri Chornoivan
8bbb42b410 Fix various typos.
https://fedorahosted.org/freeipa/ticket/3089
2012-09-18 08:45:28 +02:00
Petr Vobornik
b4d35718a5 Prevent opening of multiple dirty dialogs on navigation
Facets which performs AJAX call after update refresh (clear dirty state) after calling callback of dirty dialog. It might lead to multiple openings of dirty dialog.

Assuming that calling dirty dialog's callback can be evaluated as "dirty state is gone", we can call reset in the callback to prevent the issue. There will be an incorrect state in the facet for a moment. It will be fixed soon on execute of callback of the refresh AJAX call. It is not an issue because it will happen in background. User will be looking on different facet.

https://fedorahosted.org/freeipa/ticket/2667
2012-09-12 09:37:53 +02:00
Petr Vobornik
a4ab88445c Reflect API change of SSH store in Web UI
Format of ipasshpubkey in users and hosts changed from BYTES to STR. Web UI no longer gets the value as base64 encoded string in a object.

Label was changed to reflect that the key don't have to be plain base64 encoded blob.

https://fedorahosted.org/freeipa/ticket/2989
2012-09-06 19:18:22 -04:00
Sumit Bose
377e1267b7 Rename range CLI to idrange 2012-09-07 16:50:35 +02:00
Petr Vobornik
835c7859c5 Update of confirmation of actions
This patch is changing confirmation of actions according to ticket #3035, see the ticket description.

It does following changes:
 * Confirmation of update action was removed.
 * Action lists resets to first action (which is usually a NOP: '-- select action --') on change of displayed entry.
 * New confirmation dialog was implemented. It is used for action confirmation. It is used in IPA.action to replace the call of window.confirm(message). The old call is a modal window which blocks all JS functionality and has different style than other dialogs in Web UI. The new one has same design and doesn't block background operations.

 https://fedorahosted.org/freeipa/ticket/3035
2012-09-06 17:36:29 +02:00
Petr Vobornik
da0be8b6b1 Allow localhost in zone ACIs - Web UI
Loopback address, "localhost" and "localnets" ACIs are no longer
an issue for bind-dyndb-ldap. Allow them in our Web UI validators as well.
2012-09-06 13:59:33 +02:00
Petr Vobornik
22b7d7e7d9 Fixed problem while deleting entry with unsaved changes
While deleting an entry it now resets a facet if there are unsaved changes. It prevents pop up of various error dialogs when UI tries to redirect to search page after successful delete.

https://fedorahosted.org/freeipa/ticket/3047
2012-09-06 10:27:36 +02:00
Petr Vobornik
da10cc96a6 Generated metadata for testing updated
Testing metadata needs to be updated because of fix in json serialization.

https://fedorahosted.org/freeipa/ticket/3052
2012-09-06 10:27:26 +02:00
Petr Vobornik
77ad84f47e Added decimal checks to metadata validator
Medatadata validator didn't have check for decimal values. It was added.

https://fedorahosted.org/freeipa/ticket/3052
2012-09-06 10:27:16 +02:00
Petr Vobornik
6a8d6d3fde Notify success on add, delete and update
Notification of success was added to:
 * details facet: update
 * association facet and association widget: add, delete items
 * attribute facet: delete items (notification of add should be handled in entity adder dialog)
 * sudo rule: add, remove option
 * dnsrecord: add, update, delete

https://fedorahosted.org/freeipa/ticket/2977
2012-09-06 09:44:15 +02:00
Petr Vobornik
6ae286a8f5 Permissions: select only applicable options on type change
Problem:
 When a permission is edited, and Type switched, the attributes selected for
 previous Type are still selected, and update fails, if they are invalid for the
 new Type. But it should get deselected or not even listed if Type changes.

Fix:
 When Type is changed, attribute list is refreshed and still applicable attributes
 are chosen. If Type is reverted back, previously chosen  attributes are back as chosen.

 If attributes are extended outside Web UI by not listed attr, this attr is listed at
 the list end.

Note:
 If user makes change in attribute list before type change, this change is forgotten.

https://fedorahosted.org/freeipa/ticket/2617
2012-09-06 09:41:44 +02:00
Petr Vobornik
a8a80d983e Fixed search in HBAC test
Search in HBAC test wasn't working because expired flag wasn't set.

https://fedorahosted.org/freeipa/ticket/2931
2012-09-06 09:41:22 +02:00
Petr Vobornik
edbcd28f44 Password policy paging with proper sorting
This patch adds option to disable sorting when paging. It allowed to enable paging in password policy with order of items untouched (they are sorted on server side by priority).

Also fixing issue when paging is disabled and command summary = null. It displayed 'null' in facet footer.

https://fedorahosted.org/freeipa/ticket/2677
2012-08-29 12:00:15 +02:00
Petr Vobornik
81007ff385 Successful action notification
User was not notified about success of actions executed from action list, action panel or facet cotrol bar.

This patch adds IPA.notify_success(message) call. It creates a yellow notification area with supplied message in Web UI header in the middle of the green area (empty space of first level navigation).
This area is displayed for 3s and then it fades out (800ms). It also fades out when it is clicked.

This call is used(directly or indirectly) in:
 * search facets: delete, disable, enable actions
 * details facets: delete action
 * user details facet: reset password action
 * host details facet: unprovision, set OTP actions
 * service details facet: unprovision action
 * host and service details facet: request, revoke, restore certificates actions
 * group details facet: change to POSIX/external actions
 * dns zone details facet: add/remove permission actions

 https://fedorahosted.org/freeipa/ticket/2977
2012-08-29 12:00:06 +02:00
Petr Vobornik
7d3aa96103 Fix issue which broke setup of Web UI unit tests
Web UI itself wasn't negatively affected.

https://fedorahosted.org/freeipa/ticket/2897
2012-08-29 11:59:37 +02:00
Petr Vobornik
36c345dd1d Revert change causing failure in test automation
Move of click handler in patch for #2834 causes failure of automation tests.

This patch reverts the problematic part. It should not affect function of fix for #2824.

https://fedorahosted.org/freeipa/ticket/3014
2012-08-29 11:59:29 +02:00
Petr Vobornik
2d63e28c78 Range Web UI
Range web UI was implemented.

It consist of:
 * new menu item - 'ranges' in 'IPA Server' tab
 * new search page
 * new details page

https://fedorahosted.org/freeipa/ticket/2894
2012-08-21 14:35:19 +02:00
Petr Vobornik
690211adb5 Update other facets on delete from search page
When an object in search facet was deleted, other facets were not notified that they need to refresh. If one crated object with same pkey as deleted object and then navigated to it's details he could see old object's data.

This notification was added.

https://fedorahosted.org/freeipa/ticket/2618
2012-08-14 08:26:54 +02:00
Petr Vobornik
d227c70d15 Disable caching of Web UI login_kerberos request
IE caches login_kerberos request so SSO doesn't work after logout. This patch disables the caching.

https://fedorahosted.org/freeipa/ticket/2991
2012-08-14 08:22:48 +02:00
Petr Vobornik
be144da672 Handle case when trusted domain user access the Web UI
WebUI catches the fact that the user can't access LDAP server with a current ticket. It shows form-based auth login dialog. Previoustly an ugly error was returned on an almost empty page, and user had no recourse.

https://fedorahosted.org/freeipa/ticket/2897
2012-08-14 08:20:46 +02:00
Petr Vobornik
ade68ec94f Read-only external facet for non-external groups
Added evaluators to decide if attribute facet should be read-only based on attribute level rights.
Default values serves well for group's external member.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:50 +02:00
Petr Vobornik
994eeb55c9 Group external member facet
Added 'external' attribute facet to group entity. It serves for displaying group's externalmember attribute.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:47 +02:00
Petr Vobornik
5d2b0fecd5 Attribute facet
Created new type of facet: attribute facet. This facet is similar to association facet but it serves for displaying object's multivalued attributes which behaves like association attributes. It will serve as a basis for displaying group's externalmember attribute.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:43 +02:00
Petr Vobornik
7c99e2d661 Display group type
Created new value_map_widget which serves for displaying values based on a map.

It is added to group for displaying its type. The decision is based on group's objectclass.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:39 +02:00
Petr Vobornik
d536b3824e Make group posix
New option for creating plain user group posix group. External group can't be made posix.

https://fedorahosted.org/freeipa/ticket/2338
2012-08-14 08:09:35 +02:00
Petr Vobornik
271043ccf7 Make group external
New action for creating plain group external. Posix group can't be made external.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:31 +02:00
Petr Vobornik
44e86aa3bb Add external group
Group can be normal, posix and external. Posix checkbox was removed and was replaced by radio for selecting group type. This adds possibility of adding of external group.

https://fedorahosted.org/freeipa/ticket/2895
2012-08-14 08:09:23 +02:00
Petr Vobornik
c2783b9b54 Replace use of attr with prop for booleans
Recommened way of setting boolean HTML attributes is by $.prop(boolean) method not $.attr(boolean) because it sets DOM object property not an attribute. Latter works because of jquery's backward compatibility. This patch makes things clearer.

Some info about prop and attr: http://stackoverflow.com/a/5876747

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:17 +02:00
Petr Vobornik
1a94109f4a Fixed incorrect use of jQuery.attr for setting disabled attribute
Occurance: select_widget

Update to latest version of jQuery uncovered this issue.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:17 +02:00
Petr Vobornik
8ce157910a Web UI tests fix
ACI tests were crashing because of misconfigured facet.
Entity link test were crashing because of incorrect jquery selector.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:17 +02:00
Petr Vobornik
17a6b3f29d Unified buttons
Buttons in association dialog and action list have different style and behavior than buttons in dialogs. This patch unifies it by using jquery.button widget.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:17 +02:00
Petr Vobornik
1c79e283b1 Removal of unnecessary overrides of jquery-ui styles
ipa.css had to be updated to work with updated jquery-ui. This patch removes several duplicate styles.

Following issues were fixed:
 * dialogs titles in IE and Opera were black instead of green
 * no black line in first navigation level in IE and Opera
 * all browsers (FF, IE, Chrome, Opera) have the same style for buttons and headers
 * dialogs has borders again (should we remove its shadow?)

Known issues:
 * selected tab-1 in Chrome and Opera doesn't overlaps background line as in IE and FF. Not sure how to fix without breaking (there are border overlaps) the latter ones. I think it looks good enough.
 * some buttons are missing padding. Will be fixed in next patch.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:16 +02:00
Petr Vobornik
f805001242 Fix for incorrect event handler definition
Clicks events should be better defined by jquery calls (usually addEventListener) not as elements attributes. Definition as element attribute causes problems after upgrade to jquery 1.7.2. Two occurances were removed.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:16 +02:00
Petr Vobornik
2a7e557112 Update to jquery-ui-1.8.21.custom
jquery-ui was regenerated to up to date version.

Border radius and IPA custom colors were added to theme so we don't have to override them in ipa.css.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:16 +02:00
Petr Vobornik
c0dd19da4b Update to jquery.1.7.2.min
jquery library wasn't updated for a long time.

https://fedorahosted.org/freeipa/ticket/2817
2012-08-02 10:27:16 +02:00
Petr Vobornik
dc79b60ebb PAC Type options for services in Web UI
Following options were added to Web UI
    * PAC Type in service
    * PAC Type in configuration

Testing metadata for objects and commands were regenerated.

https://fedorahosted.org/freeipa/ticket/2958
2012-08-02 10:22:25 +02:00
Petr Vobornik
fd31396d51 Fixed: combobox stacking in service adder dialog
First select's content is displayed under second comboxes content when select is opened when second combobox is opened

Bonus for:
https://fedorahosted.org/freeipa/ticket/2834
2012-08-01 13:12:42 +02:00
Petr Vobornik
7a2587e6a1 Fixed: Unable to select option in combobox in IE and Chrome
There's probably a bug regarding z-index stacking in Chrome and IE. It appears when combobox is used in dialog. Combobox's select area had z-index=1010. When first jquery dialogs is open it has z-index=1000. Further dialogs have higher z-index. When dialog's z-index exceeds 1010 option in select control can't be selected. IMO it is a browser bug because select control lies in dialog content's stacking context so it should be functional even with z-index=1.

This patch raises select area's z-index to 9000000 which should prevent the issue for some time. Also it make's combobox's z-index configurable so we can solve combobox stacking (ie in service-add dialog).

Second part of:
https://fedorahosted.org/freeipa/ticket/2834
2012-08-01 13:12:33 +02:00
Petr Vobornik
1235739122 Fix autoscroll to top in tables in IE
In IE when a window is small (horizontal scrollbar is displayed) click or keyboard input on various parts of UI makes search tables scroll to top. It prevents from selecting items in a table. This issue happens when using absolute positioned element with overflow style. It's a bug in IE.

Two workarounds were added to make UI usable in IE.
Adding position:relative; style to body element fixes the problem in search pages. It doesn't help in association dialogs though.
The bug doesn't occur when some child element has focus. It's possible to set focus to first visible checkbox while scrolling down but user experience is very bad. Better solution seems to scroll back when IE scrolls to top on mousedown. That way mouse click event happens on the target element and it can gain focus and therefore be selected. Some glitches still remains but is usable.

https://fedorahosted.org/freeipa/ticket/2835
2012-07-25 11:06:02 +02:00
Petr Vobornik
65bd82eaa1 IDs and names for dialogs
It's hard to detect if or which type dialog is displayed becouse not all dialogs have IDs.

On dialog open, it's id or name (if id is not set) is used for containing element id. Many of dialog types were missing id or name so name was added to each dialog type.

In HTML, element's id should be unique. Our framework allows opening two dialogs with the same id. It may lead to state where getElementById method may have unpredicted behaviour. Therefore attribute 'data-name' with dialog's name was added to dialog's containing element. Automation framework can search more reliable by using this attribute instead of id.

https://fedorahosted.org/freeipa/ticket/2853
2012-07-25 11:05:56 +02:00
Petr Vobornik
3adebcf919 Bigger textarea for permission type=subtree
Adder dialog and details facet for permission type=subtree have small textarea for defining subtree filter. It was unconfortable to define the filter. This difference was removed.

https://fedorahosted.org/freeipa/ticket/2832
2012-07-18 15:52:00 +02:00
Petr Vobornik
a14d243fcd Fixed display of attributes_widget in IE9
Attributes widget is using overflow css rule in tbody element. IE9 doesn't handle it well.

To fix the issue, attributes widget was slightly modified and conditional css stylesheet was added just for fixing IE problems.

https://fedorahosted.org/freeipa/ticket/2822
2012-07-17 15:55:44 +02:00
Petr Vobornik
7fcca4fa52 Differentiation of widget type and text_widget input type
There was a clash of 'type' attribute in widget's spec. Usually 'type' is used for telling a builder which field and widget to build. Text widget used this attribute also for definion of html input type. It was problematic for some special widgets, which defined own field and used text_widget, like service_type or dnszone_name. In those and possibly other cases it used widget type for specifying input type which lead to execution error in Internet Explorer. Firefox and Chrome took it.

This patch is changing text_widget's 'type' to 'input_type' which removes the collision and hence fixes the problem.

https://fedorahosted.org/freeipa/ticket/2806
and half of: https://fedorahosted.org/freeipa/ticket/2834
2012-07-17 15:55:35 +02:00
Petr Vobornik
14ac2193fe Add and remove dns per-domain permission in Web UI
This patch adds support for new per-domain permissions to Web UI.

User with assigned permission (through role,priviledge) can edit DNS zone. These permissions can be added/remove by ipa dnszone-{add/remove}permission $dnszone command.

For adding/removing of this permission in Web UI new actions in DNS zone action list were created. DNS zone object doesn't contain information about existance of related permission. Such information is required for enabling/disabling of new actions. Web UI has to search for the permission to get it. DNS zone facet was modified to use batch command, in a same way as user facet, for loading dnszone and the permission at the same time - on load.

Batch command has a feature to report all errors. Such behavior is unwanted because we expect that permission-show command will fail when the permission doesn't exist. Batch command was therefore modified to not report commands which has retry attribute set to false. This attr was chosen because it has similar purpose in single command execution.

New actions should be enabled only for users with appropriate rights. It is not possible to obtain rights for certain action in advance so an approximation is used: write right for dns zones' managedby attribute.

https://fedorahosted.org/freeipa/ticket/2851
2012-07-11 16:33:10 +02:00
David Spångberg
e494650b2c Indirect roles in WebUI
Add a check in the WebUI to use the admin navigation if a user is a
indirect member of a role.
2012-07-11 08:54:45 +02:00
Petr Vobornik
0d11b8b056 Web UI: kerberos ticket policy measurement units
Added measurement units for kerberos ticket policy.

https://fedorahosted.org/freeipa/ticket/2444
2012-07-10 13:30:43 +02:00
Petr Vobornik
848bd0e9e7 Password policy measurement units.
When filling password policy it may be unclear what value to enter because user may not remember field's measurement unit.

This patch adds support for declaring measurement units. It's done in field's/widget's spec by entering key for unit's string (which is in IPA.messages.measurement_units[key]).

Measurement units in table layout are displayed in parenthesis after label. It is to be consistent with some fields which have measurement unit integrated in label.

This patch defines measurement units for password policy's 'History size', 'Failure reset interval' and 'Lockout duration' fields.

https://fedorahosted.org/freeipa/ticket/2437
2012-07-10 13:30:38 +02:00
Petr Vobornik
05cf7c53a6 Display loginas information only after login
Message 'Logged in as: user@FREEIPA.ORG' was displayed before user was logged in. It was wrong.

Now 'Logged in as: XXX' is displayed only when user XXX is logged in. So no more user@FREEIPA.ORG :) .

https://fedorahosted.org/freeipa/ticket/2882
2012-07-10 13:30:01 +02:00
Petr Vobornik
61c3b86d73 Moved configuration to last position in navigation
Configaration was the last navigation item in IPA server tab. Trusts changed it. It was wrong because configuration is like 'other settings' and so it should be last.

This patch moves configuration navigation item to the last position again.

https://fedorahosted.org/freeipa/ticket/2900
2012-07-06 13:46:49 +03:00
Petr Vobornik
5b103ca5b5 Continuation of removing of not supported command options from Web UI
This patch removes following non-existing command options:
 * all,rights in host_disable
 * record_type in dns_record_add
 * all,rights in various xxx_remove_xxx commands used in rule_association_table_field (removing association)

https://fedorahosted.org/freeipa/ticket/2878
2012-06-29 11:56:29 +02:00
Petr Vobornik
d46687ea91 Refactored associatin facet to use facet buttons with actions
Association facet was refactored to use new concept of control buttons. It is the last facet type which don't use this concept.
It fixes regression introduced by previous refactoring of table facet (delete button was never enabled).

https://fedorahosted.org/freeipa/ticket/2876
2012-06-29 11:56:04 +02:00
Petr Vobornik
5b7084aeb5 Web UI password is going to expire in n days notification
This patch adds pending password expiration notification support to Web UI. When user's password is going to expire in less or equal than configure days a bold red text 'Your password expires in N days.' and a link 'Reset your password' are shown in Web UI's header (on the left next to 'Logged in as...').

Clicking on 'Reset your password link' opens IPA.user_password_dialog. Successful reset of own password will reload user's information (whoami) and update header (it will most likely hide the warning and link).

https://fedorahosted.org/freeipa/ticket/2625
2012-06-29 11:55:53 +02:00
Petr Vobornik
3c36fa8c0d Action panel for certificates
This is a continuation of effor which transforms status widgets with buttons executing actions to separate status widget and action panels. This patch strips certificate status widget of its buttons and separates the actions to their own objects. Appropriate modifications are taken in host and service details facets.

New certificate loader, facet policy and evaluator are introduced to make actions and status widget independent. On facet load event new certificate facet policy loads a certificate from result. Unfortunately results don't contain revocation reason so it also executes additional cert-show command to get the revocation reason. Policy store the certifacete to facet. It raises the certifacet_loaded event to notify certificate evaluator and status widget. Status widget updates its state. Certificate evaluater updates state and actions get disabled or enabled.

https://fedorahosted.org/freeipa/ticket/2250
2012-06-27 08:58:24 +02:00
Petr Vobornik
d1fe43c56f Same password validator
This patch adds validator which compares passwords in two fields.

In future it should be used in various password reset dialogs.

A flags attribute was added to field. It's purpose is to define control flags. This patch uses it in details facet and adder dialog to not include fields to command option if the field has 'no_command' flag. Therefore there is no need to use hacks such as disabling of field or removing a value from command's option map when a non-command field is needed (ie verify password).

https://fedorahosted.org/freeipa/ticket/2829
2012-06-26 12:32:50 +02:00
Petr Vobornik
ae19cce7ad Trust Web UI
This patch adds Web UI for trusts.

Navigation path is IPA Server/Trust. It allows to add, deleted and show trust. Mod command doesn't have defined input options so update of a trust is not supported yet.

Adder dialog supports two ways if adding a trust:
1)  adding with domain name, admin name and admin password.
2) adding with domain name, shared secret

Search page shows only list of realm names which are trusts' cns.

Details page is read only. It contains following attributes:
* Realm name (cn)
* Domain NetBIOS name (ipantflatname)
* Domain Security Identifier (ipanttrusteddomainsid)
* Trust direction (trustdirection)
* Trust type (trusttype)

trust_output_params also defines 'Trust status' param. This param is not return by show command as well so it's commented out in code until it's fixed in plugin code.

Fields in details pages are using labels defined in internal.py. It is temporary solution until including of command.has_output_params will be added to metadata.

https://fedorahosted.org/freeipa/ticket/2829
2012-06-25 18:17:06 +02:00
Petr Vobornik
6f4121ccbb Custom Web UI error message for IPA error 911
Error message for IPA error 911 is not very clear for end users.

This patch changes the message and adds an advice how to get rid of the error.

https://fedorahosted.org/freeipa/ticket/2778
2012-06-22 10:45:06 +02:00
Petr Vobornik
37b7b28993 Added password reset capabilities to unauthorized dialog
Web UI was missing a way how to reset expired password for normal user. Recent server patch added API for such task. This patch is adding reset password form to unautorized dialog.

If user tries to login using form-based authentication and his password is expired login form transforms to reset password form. The username and password are used from previous login attempt. User have to enter new password and its verification. Then he can hit enter button on keyboard or click on reset button on dialog to perform the password reset. Error is displayed if some part of password reset fails. If it is successful new login with values entered for password reset is performed. It should login the user. In password reset form user can click on cancel button or hit escape on keyboard to go back to login form.

https://fedorahosted.org/freeipa/ticket/2755
2012-06-21 13:23:44 +02:00
Petr Vobornik
1eab43d292 Separate reset password page
This patch adds separate reset password page. It is a complement to separate login page. It differentiate from reset password capabilities in Web UI's anauthorized dialog by not performing login. This is useful for users who wants only to reset the password and not to use Web UI. And also for users who are using the separate login page.

https://fedorahosted.org/freeipa/ticket/2755
2012-06-21 12:46:59 +02:00
Petr Vobornik
f52fa2a018 Action panel for service provisioning
Servise provisioning status widget was modified only to display the has_keytab status. Button for 'delete key,unprovision' was moved as action to newly created action panel in the same section. This required to moved the creation of the unprovisioning dialog from that widget to new separate dialog.

Action for action panel and all required status evaluators for enabling/disabling of that action were also created.

https://fedorahosted.org/freeipa/ticket/2252
2012-06-13 16:44:35 +02:00
Petr Vobornik
961aeb80e9 Action panel for host enrollment
Widgets in host enrollment sections were modified. They now serve only for displaying of has_key and has_password status. Functionality for setting otp and unprovisioning was moved to separate dialogs. Execution points for opening of these dialogs are items in new action panel in enrollment section.

https://fedorahosted.org/freeipa/ticket/2251
2012-06-13 16:44:30 +02:00
Petr Vobornik
1fcbad4bcb Update of serverconfig ipaconfigstring options
Patch "Add options to reduce writes from KDC" adds two more possible values to config plugins ipaconfigstring configuration options.

These are:
 * KDC:Disable Last Success
 * KDC:Disable Lockout

This patch adds them to Web UI

https://fedorahosted.org/freeipa/ticket/2734
2012-06-06 22:14:12 -04:00
Petr Vobornik
e61d0ada04 Removal of illegal options in association dialog
Association dialogs were using non-existent options for find commands. It causes error when #2509 is implemented.

Now when creating a find command a check for options existence is performend. Option is not used if not present in metadata. It fixes the issue.

https://fedorahosted.org/freeipa/ticket/2760
2012-06-07 11:22:21 +02:00
Petr Vobornik
7d9abecbb6 Text widget's dirty state is changed on various input methods
on_value_changed event in textboxes and textareas was raised only on keyboard input. If user used different input method such as paste or browser undo and redo functions widget's on_value_changed event wasn't raised and so dirty state wasn't changed as well.

This patch adds listener to text's and textarea's 'input' event. Input is a HTML 5 event which is raises on user initiated action.
Some of user initiated actions :
 * Cut
 * Copy
 * Paste
 * Undo
 * Redo
 * Clear
 * Typing (like keyup)
 * Form AutoFill
 * User-invoked spellcheck corrections
 * Input from Input Method Editor

It should be supported by all recent versions of major browsers. IE doesn't support it up to version 8.

Listener for 'keyup' event was left in implementation for backward compatibility with older browsers. This may cause firing on_value_change twice but so far it shouldn't cause troubles.

https://fedorahosted.org/freeipa/ticket/2647
2012-06-04 11:26:47 +02:00
Petr Vobornik
664d33cef6 Added links to netgroup member tables
Tables with members in netgroup were missing links for navigation to associated details pages. This patch adds these links.

https://fedorahosted.org/freeipa/ticket/2670
2012-06-04 11:26:34 +02:00
Petr Vobornik
27b1dace2d Removal of illegal options in JSON-RPC calls
Ticket https://fedorahosted.org/freeipa/ticket/2509 bans using non existent options. If such option is supplied command ends with error. It uncovered several cases in Web UI. This patch is fixing these cases.

Automember, Self-service and Delegation don't support 'pkey-only', 'size-limit' and 'rights' option. Pagination and rights check were disabled for them.

Automount map adder dialog was sending options for indirect map even if chosen type was direct (when those for indirect was filled earlier), also it was sending non-existant 'method' option.

https://fedorahosted.org/freeipa/ticket/2760
2012-06-04 11:26:28 +02:00
Petr Vobornik
870627de9a Added cancel button to service unprovision dialog
Service unprovision dialog was missing a cancel button. The button was added.

https://fedorahosted.org/freeipa/ticket/1811
2012-06-04 11:25:45 +02:00
Petr Vobornik
bf9234dbd1 Enable reset password action according to attribute perrmission
This patch creates state_evaluator which creates permission states for defined attribute. The state format is: attributeName_permissionChar.

This evaluator is used for user_password attribute and it control enabling/disabling of related action in user account action panel.

https://fedorahosted.org/freeipa/ticket/2318
2012-06-04 10:45:08 +02:00
Petr Vobornik
bf0c6ff697 Add shadow to dialog
This patch adds shadow to dialog used in Web UI. It looks cooler.

https://fedorahosted.org/freeipa/ticket/2248
2012-06-04 10:45:08 +02:00
Petr Vobornik
496fbbd919 Added missing i18n in action list and action panel
This patch adds strings to internal.py which were not translated in action list/panel patches.

https://fedorahosted.org/freeipa/ticket/2248
2012-06-04 10:45:08 +02:00
Petr Vobornik
888797ffac Action panel for user
This patch adds action panel to user account section. The panel contain an action for reseting user password.

https://fedorahosted.org/freeipa/ticket/2248
2012-06-04 10:45:08 +02:00
Petr Vobornik
ea5ae4b1cf User password widget modified.
Currently the user password is shown as follows in the details page:
    Password: Reset Password

This is inconsistent with the rest of the page because the 'Reset Password' is an action, not the value of the password.

Now password is shown as follows:
    Password: *******   (if set)
    Password:           (if not set)

Reset password link was removed as well the dialog for reset password was removed from password widget. The dialog was moved to its own object and can be now showed independently. An action for showing this dialog should be created.

https://fedorahosted.org/freeipa/ticket/2248
2012-06-04 10:45:07 +02:00
Petr Vobornik
890151dca8 Action panel
This patch implements action panel. Action panel is a box located in facet details section which contains actions related to that object/section.

In spec file can be configured actions and title used in action panel. Default title is 'Actions'. Actions are specified by their name. They have to be defined in action collection in facet.

https://fedorahosted.org/freeipa/ticket/2248
2012-06-04 10:45:07 +02:00
Petr Vobornik
bd36600efe Refactored entities to use changed actions concept
It's continuation of previous refactoring effort. This part is changing specs in entities to used changed concept.

https://fedorahosted.org/freeipa/ticket/2248
2012-06-04 10:45:07 +02:00
Petr Vobornik
306f380258 Refactored action list and control buttons to use shared list of actions
This is a first step for implementing action panels which will also use the shared list of actions.

This effor changes the way how action list and control buttons are defined. First all actions are defined on facet level - attribute 'actions' in spec file. Implementation of action list widget is not specified on facet level. It is left in facet header. A list of action names used in action list can be now specified in facet spec in 'header_actions' attribute.
Control buttons use similar concept. Facet by default is using control_buttons_widget. Details and search facet are defining their own default actions (refresh/add/remove/update/reset). Additional buttons can be defined as array of action names on facet level in control_buttons attribute.

state_evaluators and state_listeners were united. They are called state_evaluators but they uses state_listener concept, they are attached to an event. For former state_evaluator the event is post_load. They are defined in spec in state attribute. State object purpose is to aggregate states from all state evaluators. It offers changed event to which can other objects subscribe. It also has summary evaluator which evaluation conditions.  Summary evaluator creates summary status with human readable description. It can be used by facet header.

https://fedorahosted.org/freeipa/ticket/2248
2012-06-04 10:45:07 +02:00
Petr Vobornik
02b942a72e Correction of nested search facets tab labels
Nested search facets were using 'search' tab label instead of their nested entity name.

This patch is fixing that regression.

https://fedorahosted.org/freeipa/ticket/2744
2012-05-15 13:06:06 +02:00
Petr Vobornik
77f2f87fe5 Improved calculation of max pkey length in facet header
Very long pkeys in facet header were limited to 60 characters. This magic number was good enough but with new action lists it isn't.

This patch is adding calculation of maximum characters for pkey in facet header. It fixes regression introduced by Action Lists and also it uses effectively available space.

Also this patch is changing limiting of breadcrumbs element to use as much space as possible. It works in three steps. First a threshold is set which is equal to length average. Then a total length of keys with length less than threshold is calculated. From this we can get remaining space for long keys and calculate new threshold. At last keys are limited to new threshold.

https://fedorahosted.org/freeipa/ticket/2247

f
2012-05-15 13:05:21 +02:00
Petr Vobornik
69877296dc Host page fixed to work with disabled DNS support
When DNS support was disabled there were following errors in Web UI:
 1) Host details page was not filled with data
 2) Host adder dialog was broken -> unusable
 3) DNS tab was displayed in navigation

The bugs were fixed by:

1) Was caused by entity_link_widget. The widget was modified to do not show link if other_entity (in this case dnsrecord) is not present.

2) Was caused by host_fqdn_widget. The widget is unusable becouse withou DNS support it doesn't have access to DNS zone entity. The section with this widget was removed. Also IP address field was removed because it shouln't be used without DNS support. New 'fqdn' text box was added for specifying hostname.

3) New DNS config entity was initialized but it wasn't shown because it caused some JavaScript error. The dnsconfig's init method was modified to throw expected exception. Now no dns entity is initialized and therefore DNS tab in navigation is not displayed.

https://fedorahosted.org/freeipa/ticket/2728
2012-05-15 12:51:57 +02:00
Petr Vobornik
4640f957ad Instructions to generate cert use certutil instead of openssl
Instructions to generate certificate were changed. Now they use certutil instead of openssl. In the example is also used option for specifying key size.

https://fedorahosted.org/freeipa/ticket/2725
2012-05-15 10:36:53 +02:00
Petr Vobornik
472f9fc5aa Consistent change of entry status.
This patch adds action list and control buttons for consistent change of enty status for user, hbac rules, sudo rules, SELinux maps and dns zones.

Action lists with 'enable' and 'disable' and 'delete' options were added to details facets.
Two control buttons: 'enable' and 'disable' were added to search facets.

https://fedorahosted.org/freeipa/ticket/2247
2012-05-11 18:30:48 +02:00
Petr Vobornik
719b09fb4e General details facet actions
This patch adds common action button actions for enabling/disabling/deleting object.

https://fedorahosted.org/freeipa/ticket/2707
2012-05-11 18:30:48 +02:00
Petr Vobornik
2c11dcda25 Batch action for search page control buttons
This patch implements a base action which can execute a batch of commands with single pkey as a parameter.

https://fedorahosted.org/freeipa/ticket/2707
2012-05-11 18:30:48 +02:00
Petr Vobornik
eeac88238a Hide search facet add/delete buttons in self-service
Adds hiding/showing capabilities to action_button_widget. This patch is fixing regression caused replacing old details facet buttons with control_buttons_widget. The problem was that some buttons were not hidden in self-service mode.

https://fedorahosted.org/freeipa/ticket/2707
2012-05-11 18:30:48 +02:00
Petr Vobornik
29059cd45d Redefined search control buttons
This patch replaces old search facet action buttons with new control_buttons_widget.

https://fedorahosted.org/freeipa/ticket/2247
2012-05-11 18:30:48 +02:00
Petr Vobornik
4db2032426 Redefined details control buttons
This patch replaces old details facet action buttons with new control_buttons_widget.

https://fedorahosted.org/freeipa/ticket/2247
2012-05-11 18:30:48 +02:00
Petr Vobornik
1f56c4e5bb Control buttons
Control buttons is a widget which contains action buttons. It is located in facet header and are supposed to replace old action buttons created by IPA.action_button(spec) call. The benefit is that now it is possible to define new buttons declaratively in spec definition without a need of inheriting facet and overriding create method.

Action buttons are an entry poing for execution facet-wide action so they are tightly bound to facet.

Action button options:
name: string
label: string, human readable label
tooltip: string, human readable tooltip
href: string, optional
icon: string, icon class
needs_confirm: boolean, default false
confirm_msg: string, human readable confirmation message
confirm_dialog: confirmation dialog, optional, custom confirmation dialog
action: action, action which will be executed
enabled: boolean, optional, default true

Control buttons are define in facet spec in control_buttons property. Its a spec object with following attributes:
  all attributes which normal widget can have
  buttons: array of action_button specs
  state_listeners: array of state listener specs

In init phase control_buttons_widget should assign a action_button a facet.

control_buttons_widget are resposible for evaluation of action_button disable/enable state because they contain state_listeners which creates the state upon the enabled/disabled state is evaluated.

State listeners are similar to state_evaluators. The differce is that the state is not evaluated from record set but from facet itself. The execution of evaluation is bound to a facet event.

https://fedorahosted.org/freeipa/ticket/2247
2012-05-11 18:30:48 +02:00
Petr Vobornik
8c3eadf978 Action lists
This patch add support fo Action Lists.

Action list is a select widget with actions as options located in facet header. Action can be selected and then executed by clickin on 'apply' button.

Actions lists are defined on facet level. Facet header takes them from facet.

Action list options
  actions: list of actions
  state_evaluator: a state evaluator which is needed for enabling/disabling options. Can encapsulate more evaluators.

State evaluator object
----------------------
State evaluator is resposible for evaluating a state from result set. State is a array of strings. Each evaluator should inherit from IPA.state_evaluator and override evaluate method.
Methods:
 evaluate(record): should return string array which represents the state
 get_description(): human readable representation of a state

Action
------
Action is a object which can perform certain action on a facet. Action has enabling and disabling conditions.

action options:
  name: string, required, name of the option
  label: string, required, human readable name of the option
  enable_cond: string array, states which need to be present in order to run this action
  disable_cond: string array, states which must not be present in order to run this action
  handler: function, contains action's logic
  needs_confirm: boolean, default false, indicates if action needs user confirmation
  confirm_msg: string, default generic message, human readable confirmation message.

Action list should contain logic which enables/disables action based on facet state and action's enabling/disabling conditions. It should also enforce presence of confirmation.

In this patch is also slightly modified facet header, mostly title part. It was revised to contain status icon, title and action list on single line. Facet header is using state evaluator's get_description method to properly set tooltip for state icon.

https://fedorahosted.org/freeipa/ticket/2247
2012-05-11 18:30:48 +02:00
Petr Vobornik
12401fe4da General builder support
Web UI mainly uses declarative way of defining UI structure. When a new object type is created it is often required to create a new builder which would build the objects from spec file. The builders' logic is mostly the same. This patch adds a general builder with some extendability capabilities.

Now it is possible to:
  1) define spec for single object and build it by calling IPA.build(spec, /* optional */ builder_fac)
  2) define an array of specs and build the objects by the same call

Prerequisite for following action list patches.

https://fedorahosted.org/freeipa/ticket/2707
2012-05-11 18:30:48 +02:00
Petr Vobornik
e1f6962545 Paging disable for password policies
Password policies are sorted by priority. When paging is enabled, table facet uses pwpolicy-find --pkey-only to get all pwpolicies keys. Those keys are sorted on server by priority but table facet sorts them again. This breaks the priority sorting.

This patch disables the paging in passord policy serch page so the keys are sorted by priority.

TODO: we should inspect sorting in table facet more deeply and disable it if it don't break anything.

https://fedorahosted.org/freeipa/ticket/2676
2012-04-26 14:32:17 +02:00
Petr Vobornik
7f2ac4c715 Added permission field to delegation
Permission field is missing in delegation so it can't be set/modified.

It was added to delegation details facet and adder dialog.

The field is using checkboxes instead of multivalued textbox because it can have only two effective values: 'read' and 'write'.

https://fedorahosted.org/freeipa/ticket/2635
2012-04-17 17:53:25 -04:00
Petr Vobornik
c64bcafa13 User is notified that password needs to be reset in forms-based login
Forms-based login procedure detects if 401 unauthorized response contains
'X-IPA-Rejection-Reason' http header with 'password-expired' value. If so
it displays an error message that user needs to reset his password.

https://fedorahosted.org/freeipa/ticket/2608
2012-04-16 21:53:56 -04:00
Petr Vobornik
2e3f5f25c4 Removed mutex option from checkboxes
Mutually exclusive checkboxes were unusual. They are not in use anymore. The functionality is removed.

https://fedorahosted.org/freeipa/ticket/2599
2012-04-10 15:44:12 +02:00
Petr Vobornik
db24a831d4 DNS forward policy: checkboxes changed to radio buttons
DNS forward policy fields were using mutually exclusive checkboxes. Such behavior is unusual for users.

Checkboxes were changed to radios.

https://fedorahosted.org/freeipa/ticket/2599
2012-04-10 15:44:05 +02:00
Petr Vobornik
dedc7889dc Added attrs field to permission for target=subtree
Permission form was missing attrs field for target=subtree. All other target types have it.

It uses multivalued text widget, same as filter, because we can't predict the target type.

https://fedorahosted.org/freeipa/ticket/2592
2012-04-10 13:19:36 +02:00
Petr Vobornik
31f1562419 Fixed: permission attrs table didn't update its available options on load
It could lead to state where attributes from other object type were displayed instead of the correct ones.

https://fedorahosted.org/freeipa/ticket/2590
2012-04-10 13:19:28 +02:00
Petr Vobornik
26abd05d5e Reworked netgroup Web UI to allow setting user/host category
This patch is changing netgroup web ui to look more like hbac or sudo rule UI. This change allows to define and display user category, host category and external host.

The core of the change is changing member attributes (user, group, host, hostgroup) to use rule_details_widget instead of separate association facets. In host case it allows to display and add external hosts.

https://fedorahosted.org/freeipa/ticket/2578
2012-04-10 13:19:13 +02:00
Petr Vobornik
18a6ab356a Inter-facet expiration
Problem:

When some facet perform action which modifies data, some other facet may become expired.

Example: User modifies group's description. Now group search facet contains old data and has to be refreshed.

Solution:

New event was added to facet: on_update. It should be executed when facet performs action which modifies data ie: details facet update or add entry to dnsrecord.

Then entity policies were introduced. Entity policies are a objects which are stored in entity.policies. They have similar function as facet_policies - performing communications and other functionality between facets. This way facets don't have to contain such logic and thus they aren't dependant on each other.

This patch adds IPA.facet_update_policy, IPA.adder_facet_update_policy, IPA.search_facet_update_policy, IPA.details_facet_update_policy.

IPA.facet_update_policy: On facets_created it bind itself to [current entity].[source facet].[event]. Default event is on_update. When the event is executed it sets expiration flag to [dest entity].[dest facet].

IPA.search_facet_update_policy: IPA.facet_update_policy where source facet = search, dest facet = details, dest entity = current entity. Its a default policy for updatein changes from search facet to details facet. Right now it isn't needed but it will be needed when action lists come to play.

IPA.details_facet_update_policy: same as IPA.search_facet_update_policy just reversed. Very important.

IPA.adder_facet_update_policy: similar functionality, just source of the event is dialog. Default event is added (new event in entity_adder_dialog).

Entity policies should be specified in entity's spec object. If none are specified a default ones are used. Default policies are: IPA.search_facet_update_policy and IPA.details_facet_update_policy.

https://fedorahosted.org/freeipa/ticket/2075
2012-03-29 13:39:53 +02:00
Petr Vobornik
bbe672a2ae Facet expiration flag
Problem:

For performance reason a facet may cache the data in browser's memory. There should be a flag to indicate whether a facet has expired and should be refreshed. The expired flag could be set by these events:

 1) any update operation
 2) changing search filter in search facet
 3) switching page in a multi-paged search/association facet
 4) switching direct/indirect view in association facet
 5) facet expiration time
A facet should be able to use these methods to refresh itself:
 6) on demand: an expired facet should be refreshed when a user opens it.
 7) automatic: an open facet should automatically refresh itself when it expires.

Solution:

This patch solves cases: #2, #3, #5, #6. Case #4 works without any change. Case #1 will be solved later. Case #7 is deffered.

Default expiration timeout was set to 10 minutes.

In this patch are also updated facet.needs_update methods to reflect changes in containing facets.

https://fedorahosted.org/freeipa/ticket/2075
2012-03-29 13:39:37 +02:00
Ondrej Hamada
cfafc415f3 Typos in FreeIPA messages
Rebased patch sent by Yuri Chornoivan (yurchor@ukr.net). Fixes 'occured'
and 'commond' typos in FreeIPA messages.

https://fedorahosted.org/freeipa/ticket/2526
2012-03-23 16:59:12 +01:00
Petr Vobornik
4a2f812eb4 Added mac address to host page
Part of support for ether maps.

https://fedorahosted.org/freeipa/ticket/2548
2012-03-20 17:32:23 +01:00
Petr Vobornik
661d82ad75 DNS forwarder validator
DNS forwarder's value can consist of IP address and a port.

The syntax is '<IP ADDRESS> port <PORT>'. A new validator was created for this purpose. It is based on IP address validator.

https://fedorahosted.org/freeipa/ticket/2490
2012-03-20 17:32:18 +01:00
Petr Vobornik
1b0ede0776 Add support of new options in dnsconfig
dnsconfig was extended of new attributes, so reflecting it in UI.

New attributes:
  * idnsForwardPolicy
  * idnsAllowSyncPTR
  * idnsZoneRefresh

 https://fedorahosted.org/freeipa/ticket/2489
2012-03-20 17:32:16 +01:00
Petr Vobornik
2449b4d827 Fixed rpm build warning - extension.js listed twice
Building the ipa rpms returns this:
warning: File listed twice: /usr/share/ipa/ui/extension.js

This is because of a glob:
%{_usr}/share/ipa/ui/*.js

and then more specifically:
%config(noreplace) %{_usr}/share/ipa/ui/extension.js

https://fedorahosted.org/freeipa/ticket/2253
2012-03-19 18:38:46 +01:00
Petr Vobornik
66692127c6 Show_content on refresh success
If an error content is displayed a successfull refresh doesn't show properly populated facet content. This patch adds show_content call to refresh success handlers which solves the problem.

https://fedorahosted.org/freeipa/ticket/2449
2012-03-19 18:37:39 +01:00
Petr Vobornik
646a4ccde3 Content is no more overwritten by error message
When an error which caused calling of report_error occurt, the content of a facet got replaced by error message. There was no way how to force the facet to recreate its content and the facet became unusable.

This patch creates a containter for an error message. On error,  report_error writes its content to error container, content container is hidden and error container is shown. Older comment in a code suggested to move the error message to facet's footer. A message in a footer could be missed by the user and on top of that a footer is sometimes used by various facet and we would have to solve the same problem again.

From experience the cause of an error is usually a missing pkey in a path. Therefore error information suggests user to navigate to top level. It causes to load default facets with default values so errors in navigation state shouldn't happen.

Facet content is displayed back on facet_show. If user tries to display same object as before facet's need_update() would return false, therefore need_update was modified to always return true if error is displayed.

Reproduction:
 1) display any nested entity - ie DNS record
 2) delete its parent pkey from path - &dnszone-pkey=example.com
 3) reload the page with this path

https://fedorahosted.org/freeipa/ticket/2449
2012-03-19 18:37:19 +01:00
Petr Vobornik
97e440bf4b Better hbactest validation message
HBAC Test validation message contains all missing values in form of list of links instead of general 'missing values' message and redirection to first missing value's facet.

When a link is clicked user is redirected to value's facet.

https://fedorahosted.org/freeipa/ticket/2182
2012-03-15 16:08:16 +01:00
Petr Vobornik
3ca0f6aee5 Fixed evaluating checkbox dirty status
Problem:
When value in checkbox is modified twice in a row (so it is at its original value) an 'undo' button is still visible even when it shouldn't be.

Cause:
IPA server sends boolean values as 'TRUE' or 'FALSE' (strings). Checkbox_widget converts them to JavaScript? boolean (true, false). Save method in checkbox_widget is returning array with a boolean. So test_dirty method always evaluates to dirty because 'FALSE' != false.

This patch is fixing the problem.

https://fedorahosted.org/freeipa/ticket/2494
2012-03-15 16:08:02 +01:00
Petr Vobornik
d082b64b7b Certificate serial number in hex format - ui testing data
Updated UI static content to contain value and label for certificate serial_number_hex.

https://fedorahosted.org/freeipa/ticket/1991
2012-03-14 04:40:35 -04:00
Rob Crittenden
d4a80dbe52 Display serial number as HEX (DECIMAL) when showing certificates.
https://fedorahosted.org/freeipa/ticket/1991
2012-03-14 04:40:35 -04:00
Petr Vobornik
4385816dbb Fixed checkbox value in table without pkey
When a table is displaying a record set without entity's pkey attribute. A checkbox value isn't properly prepared. This patch adds the preparation (converts value to string).

https://fedorahosted.org/freeipa/ticket/2404
2012-03-14 09:08:01 +01:00
Petr Vobornik
6066432f0d Fixed mask validation in network_validator
Network validator allowed invalid mask format:
 * leading zeros: 192.168.0.1/0024
 * trailing chars: 192.168.0.1/24abcd

It was fixed.

https://fedorahosted.org/freeipa/ticket/2493
2012-03-14 09:07:58 +01:00
Petr Vobornik
31eebda584 Removed CSV creation from UI
Creating CSV values in UI is unnecessary and error-prone because server converts them back to list. Possible problems with values containing commas may occur.  All occurrences of CSV joining were therefore removed.

https://fedorahosted.org/freeipa/ticket/2227
2012-03-02 11:45:21 -06:00
Petr Vobornik
c643197b19 Improved usability of login dialog
Usability was imporved in Unauthorized/Login dialog.

When the dialog is opened a link which switches to login form is focus so user can do following:

1) press enter (login form is displayed and username field is focused )
2) type username
3) press tab
4) type password
5) press enter

this sequence will execute login request.

When filling form user can also press 'escape' to go back to previous form state. It's the same as if he would click on the 'back' button.

https://fedorahosted.org/freeipa/ticket/2450
2012-03-02 11:05:16 +01:00
Petr Voborník
368c624a74 Forms based authentication UI
Support for forms based authentication was added to UI.

It consist of:

1) new login page
Page url is [ipa server]/ipa/ui/login.html

Page contains a login form. For authentication it sends ajax request at [ipa server]/session/json/login_password. If authentication is successfull page is redirected to [ipa server]/ipa/ui if it fails from whatever reason a message is shown.

2) new enhanced error dialog - authorization_dialog.

This dialog is displayed when user is not authorized to perform action - usually when ticket and session expires.
It is a standard error dialog which shows kerberos ticket related error message and newly offers (as a link) to use form based authentication. If user click on the link, the dialog content and buttons switch to login dialog which has same functionality as 'new login page'. User is able to return back to the error message by clicking on a back button.

login.html uses same css styles as migration page -> ipa-migration.css was merged into ipa.css.

https://fedorahosted.org/freeipa/ticket/2450
2012-03-02 11:04:33 +01:00
Petr Voborník
87901ed709 Added logout button
Logout button was added to Web UI.

Click on logout button executes session_logout command. If command succeeds or xhr stutus is 401 (unauthorized - already logged out) page is redirected to logout.html.

logout.html is a simple page with "You have been logged out" text and a link to return back to main page.

https://fedorahosted.org/freeipa/ticket/2363
2012-02-28 23:58:51 -05:00
Petr Voborník
37cdbae234 Added attrs to permission when target is group or filter
Option to set attributes in permission was missing for target 'group' and 'filter'.

Attribute_table_widget with type=group is shown for target=group.

For target=filter a multivalued textbox is shown. This is because UI can't predict what type will the result of the filter be. In future it can be extended by interactive attribute selector to help user find what he wants to enter.

Mutlivalued widget was modified to show undo button for new entries even if show_undo is false. It is useful in adder dialog to indicate that user added something and to enable it reversal.

https://fedorahosted.org/freeipa/ticket/2372
2012-02-29 13:01:22 +01:00
Petr Voborník
885ffe5a3e Multiple fields for one attribute
Current implementation has a limitation to have one field per one attribute. This is fine for most cases. For cases where an attribute can have two editor widgets which can be swapped a need for two different types of field may occur.

This patch introduces 'param' option which supposes to contain attribute name. If 'param' is not specified it will contain field's name therefore backward compatibility is maintained. This extension allows to have two fields with different name and same param -> two fields get/supply value from/to the same attribute.

Needed for:

https://fedorahosted.org/freeipa/ticket/2372
2012-02-29 13:01:16 +01:00
Petr Voborník
34f742bec2 Fixed selection of single value in combobox
When editable combobox had only one option and input field was cleared, the option couldn't be selected if it was selected before.

This patch adds click handler to option elements. The handler calls select_on_change.

When different option is selected select_on_change is executed twice. To avoid duplicate call of value_changed an open state of option area is checked. In first pass the area will be closed so it won't be executed in second. When selected option is clicked, only onclick handler is processed.

This patch assumes that select event will be processed before click event.

https://fedorahosted.org/freeipa/ticket/2070
2012-02-29 12:59:14 +01:00
Petr Voborník
87c2b00bf8 Fixed redirection in Add and edit in automember hostgroup.
Redirection in 'Add and edit' in automember hostgroup now navigates to correct facet.

https://fedorahosted.org/freeipa/ticket/2422
2012-02-29 12:59:14 +01:00
Petr Voborník
7da8d2f296 Added unsupported_validator
dnszone attributes idnsallowquery and idnsallowtransfer have valid but currently unsupported values: 'localhost' and 'localnets'.

New validator was introduced for unsuported values. By using this validator user can see that the value is currently unsupported instead of showing 'invalid value' or passing the value to server and creating error there.

https://fedorahosted.org/freeipa/ticket/2351
2012-02-29 12:59:13 +01:00
Petr Voborník
cf60e7e71e Fixed DNS record add handling of 4304 error
Fixed hanling of 4304 error in DNS record add.

Code which handled this error in host-add was generalized and moved to IPA. DNS record add both in adder dialog and dns record table are using this generalized version.

https://fedorahosted.org/freeipa/ticket/2349
2012-02-29 12:59:13 +01:00
Petr Voborník
525bf04da5 Making validators to return true result if empty
All custom validators were changed to return true result if value is empty. Raising error if value is empty is resposibility of check_required call.

This fixes immediate displaying of error message in multivalued fields containing custom validators.

https://fedorahosted.org/freeipa/ticket/2351
2012-02-29 12:59:13 +01:00
Petr Voborník
52208e8b40 Moved is_empty method from field to IPA object
is_empty method represents IPA UI standard of evaluating whether value is empty. Therefore is should be placed in IPA object instead of IPA.field to allow reuse in different locations.

https://fedorahosted.org/freeipa/ticket/2351
2012-02-29 12:59:13 +01:00
Petr Voborník
25bda1e860 New UI for DNS global configuration
UI for DNS global configuration was implemented.

https://fedorahosted.org/freeipa/ticket/2350
2012-02-29 12:59:13 +01:00
Petr Voborník
43bbbf749d Fixed displaying of A6 Record
UI was modified to reflect changes in #2309.

Now it uses a6_part_data attribute instead of a6record. This fixes displaying of values in a table and modification of existing A6 record.

https://fedorahosted.org/freeipa/ticket/2367
2012-02-29 12:59:13 +01:00
Petr Voborník
fbf46fb78c DNS UI: added A,AAAA create reverse options to adder dialog
To DNS record adder dialog were added a_extra_create_reverse and aaaa_extra_create_reverse options.

It's UI part of #2009.

https://fedorahosted.org/freeipa/ticket/2349
2012-02-29 12:59:13 +01:00
Petr Voborník
a1f8c39f88 DNS Zone UI: added new attributes
New attributes were added to DNS zone details facet.

Attributes:
    idnsallowquery
    idnsallowtransfer
    idnsforwarders
    idnsforwardpolicy
    idnsallowsyncptr

New network address validator created for idnsallowquery and idnsallowtransfer attributes.

Network address validator also added to dnszone adder dialog - from_ip field.

https://fedorahosted.org/freeipa/ticket/2351
2012-02-29 12:59:13 +01:00
Petr Voborník
7c392cb9a8 New checkboxes option: Mutual exclusive
Problem:
UI doesn't have a control for selecting one or none value from given set of values.

Solution:
Attribute mutex was added to checkboxes_widget. When it is set, checking some value causes that all other values are unchecked.

https://fedorahosted.org/freeipa/ticket/2351
2012-02-29 12:59:13 +01:00
Petr Voborník
a66d8d51b6 Static metadata update - new DNS options
Tickets: #2349 #2350 #2351 #2367
2012-02-29 12:59:13 +01:00
John Dennis
ee780df13c Implement password based session login
* Adjust URL's
  - rename /ipa/login -> /ipa/session/login_kerberos
  - add /ipa/session/login_password

* Adjust Kerberos protection on URL's in ipa.conf

* Bump VERSION in httpd ipa.conf to pick up session changes.

* Adjust login URL in ipa.js

* Add InvalidSessionPassword to errors.py

* Rename krblogin class to login_kerberos for consistency with
  new login_password class

* Implement login_password.kinit() method which invokes
  /usr/bin/kinit as a subprocess

* Add login_password class for WSGI dispatch, accepts POST
  application/x-www-form-urlencoded user & password
  parameters. We form the Kerberos principal from the server's
  realm.

* Add function  krb5_unparse_ccache()

* Refactor code to share common code

* Clean up use of ccache names, be consistent

* Replace read_krbccache_file(), store_krbccache_file(), delete_krbccache_file()
  with load_ccache_data(), bind_ipa_ccache(), release_ipa_ccache().
  bind_ipa_ccache() now sets environment KRB5CCNAME variable.
  release_ipa_ccache() now clears environment KRB5CCNAME variable.

* ccache names should now support any ccache storage scheme,
  not just FILE based ccaches

* Add utilies to return HTTP status from wsgi handlers,
  use constants for HTTP status code for consistency.
  Use utilies for returning from wsgi handlers rather than
  duplicated code.

* Add KerberosSession.finalize_kerberos_acquisition() method
  so different login handlers can share common code.

* add Requires: krb5-workstation to server (server now calls kinit)

* Fix test_rpcserver.py to use new dispatch inside route() method

https://fedorahosted.org/freeipa/ticket/2095
2012-02-27 05:57:43 -05:00
John Dennis
9753fd4230 Tweak the session auth to reflect developer consensus.
* Increase the session ID from 48 random bits to 128.

* Implement the sesison_logout RPC command. It permits the UI to send
  a command that destroys the users credentials in the current
  session.

* Restores the original web URL's and their authentication
  protections. Adds a new URL for sessions /ipa/session/json. Restores
  the original Kerberos auth which was for /ipa and everything
  below. New /ipa/session/json URL is treated as an exception and
  turns all authenticaion off. Similar to how /ipa/ui is handled.

* Refactor the RPC handlers in rpcserver.py such that there is one
  handler per URL, specifically one handler per RPC and AuthMechanism
  combination.

* Reworked how the URL names are used to map a URL to a
  handler. Previously it only permitted one level in the URL path
  hierarchy. We now dispatch on more that one URL path component.

* Renames the api.Backend.session object to wsgi_dispatch. The use of
  the name session was historical and is now confusing since we've
  implemented sessions in a different location than the
  api.Backend.session object, which is really a WSGI dispatcher, hence
  the new name wsgi_dispatch.

* Bullet-proof the setting of the KRB5CCNAME environment
  variable. ldap2.connect already sets it via the create_context()
  call but just in case that's not called or not called early enough
  (we now have other things besides ldap which need the ccache) we
  explicitly set it early as soon as we know it.

* Rework how we test for credential validity and expiration. The
  previous code did not work with s4u2proxy because it assumed the
  existance of a TGT. Now we first try ldap credentials and if we
  can't find those fallback to the TGT. This logic was moved to the
  KRB5_CCache object, it's an imperfect location for it but it's the
  only location that makes sense at the moment given some of the
  current code limitations. The new methods are KRB5_CCache.valid()
  and KRB5_CCache.endtime().

* Add two new classes to session.py AuthManager and
  SessionAuthManager. Their purpose is to emit authication events to
  interested listeners. At the moment the logout event is the only
  event, but the framework should support other events as they arise.

* Add BuildRequires python-memcached to freeipa.spec.in

* Removed the marshaled_dispatch method, it was cruft, no longer
  referenced.

https://fedorahosted.org/freeipa/ticket/2362
2012-02-27 05:54:29 -05:00
Petr Voborník
a7ced67e77 Added missing configuration options
Missing options were added to Web UI's IPA Server/Configuration page.
 * ipaconfigstring
 * ipaselinuxusermaporder
 * ipaselinuxusermapdefault

https://fedorahosted.org/freeipa/ticket/2285
https://fedorahosted.org/freeipa/ticket/2400
2012-02-20 15:47:39 -06:00
Petr Voborník
a11f1bb2c2 Fixed problem when attributes_widget was displaying empty option
Attribute table was modified to skip creation of option for empty value.

https://fedorahosted.org/freeipa/ticket/2291
2012-02-20 15:47:32 -06:00
Petr Voborník
8ad295a554 Redirection to PTR records from A,AAAA records
Address column in A, AAAA DNS records was exented of redirection capabilities.
Redirection dialog is shown after a click on a value.
Dialog does following steps:
 1) fetch all dns zones
 2) find most accurate reverse zone for IP address
    2 -fail) show error message, stop
 3) checks if target record exists in the zone
    3 -fail) show 'dns record create link', stop
 4) redirects

Click on 'dns record create link':
 1) creates record
   1 -fail) show error, stop
 2) redirects

https://fedorahosted.org/freeipa/ticket/1975
2012-02-15 09:23:26 +01:00
Petr Voborník
eb87b8c319 UI support for ssh keys
To user and host details pages was added ipasshpubkey attribute.

New widget for ssh public keys was created.

https://fedorahosted.org/freeipa/ticket/2340
2012-02-15 09:23:05 +01:00
Petr Voborník
2755709f2e Removed question marks from field labels
In user group adder dialog, the "Is this a POSIX group?" was replaced with "POSIX group".
In host search facet, the "Enrolled?" was replaced with "Enrolled".

https://fedorahosted.org/freeipa/ticket/2353
2012-02-14 08:35:49 -06:00
Petr Vobornik
7e02cb8aec Fixed entity link disabling
Problem:
Entity link (eg: to hosts in dns record or to dns record in host) is not changing its state when linked record doesn't exist. The link can remain wrongly enabled from previous state.

Fixed:
The link is disabled when target doesn't exist.

https://fedorahosted.org/freeipa/ticket/2364
2012-02-14 08:35:41 -06:00
Endi S. Dewata
eba3a341e6 Fixed ipa.js for sessions.
The patch fixes a problem in error_handler_login() when it gets
an error other than 401.

The login_url is not needed for fixtures because it does not need
authentication.

The patch also fixes jslint warnings and formatting issues.
2012-02-09 13:21:12 -06:00
John Dennis
bba4ccb3a0 add session manager and cache krb auth
This patch adds a session manager and support for caching
authentication in the session. Major elements of the patch are:

* Add a session manager to support cookie based sessions which
  stores session data in a memcached entry.

* Add ipalib/krb_utils.py which contains functions to parse ccache
  names, format principals, format KRB timestamps, and a KRB_CCache
  class which reads ccache entry and allows one to extract information
  such as the principal, credentials, credential timestamps, etc.

* Move krb constants defined in ipalib/rpc.py to ipa_krb_utils.py so
  that all kerberos items are co-located.

* Modify javascript in ipa.js so that the IPA.command() RPC call
  checks for authentication needed error response and if it receives
  it sends a GET request to /ipa/login URL to refresh credentials.

* Add session_auth_duration config item to constants.py, used to
  configure how long a session remains valid.

* Add parse_time_duration utility to ipalib/util.py. Used to parse the
  session_auth_duration config item.

* Update the default.conf.5 man page to document session_auth_duration
  config item (also added documentation for log_manager config items
  which had been inadvertantly omitted from a previous commit).

* Add SessionError object to ipalib/errors.py

* Move Kerberos protection in Apache config from /ipa to /ipa/xml and
  /ipa/login

* Add SessionCCache class to session.py to manage temporary Kerberos
  ccache file in effect for the duration of an RPC command.

* Adds a krblogin plugin used to implement the /ipa/login
  handler. login handler sets the session expiration time, currently
  60 minutes or the expiration of the TGT, whichever is shorter. It
  also copies the ccache provied by mod_auth_kerb into the session
  data.  The json handler will later extract and validate the ccache
  belonging to the session.

* Refactored the WSGI handlers so that json and xlmrpc could have
  independent behavior, this also moves where create and destroy
  context occurs, now done in the individual handler rather than the
  parent class.

* The json handler now looks up the session data, validates the ccache
  bound to the session, if it's expired replies with authenicated
  needed error.

* Add documentation to session.py. Fully documents the entire process,
  got questions, read the doc.

* Add exclusions to make-lint as needed.
2012-02-09 13:20:45 -06:00
Petr Voborník
cbd77cae0a Automember UI - Fixed I18n labels
Hard-coded labels in Automember UI have been moved into internal.py to
allow translation.

https://fedorahosted.org/freeipa/ticket/2195
2012-02-07 00:48:10 -06:00
Petr Voborník
fccea2dca4 Automember UI - default groups
In this patch was implemented and added a control for defining default automember groups.

There is a difference from UXD spec. In the spec the control was placed below table in the search facet. This was not working well with the combobox in the control. Open combobox requires some space below it. As it was placed at the bottom of the page it created unwanted blank space and forced showing scrollbars. Moving the control above the table solves the problem without rewriting combobox logic. It can be rewritten and moved down later.

https://fedorahosted.org/freeipa/ticket/2195
2012-02-07 00:48:07 -06:00
Petr Voborník
199d6815d4 Automember UI
New UI for automember.

Implemented:
 * search facet core
 * rule details facet
 * attribute_table_widget - new base class for tables which contains multivalued attribute with special add/remove commands
 * adding/removing conditions in details facet

TODO:
 * label translations
 * UI for defining default rules

https://fedorahosted.org/freeipa/ticket/2195
2012-02-01 12:47:46 -06:00
Petr Voborník
c00267308e Navigation and redirection to various facets
In current implementation target facet of navigation(from menu) and redirection is always one exact facet per entity. There isn't a way to navigate to different facet from menu or redirect to different facets from various facets.

This patch adds:
 * possibility to define menu items which can navigate to different facets of various entities. This also means that now current menu tree can contain leafs with the same entity.
 * possibility to define redirection target per facet - it is needed to keep breadcrumb navigation consistent with various navigation tree patch leading to same entity leafs.

This functionality is needed for Automember UI. Automember UI is designed as if it was for two entities but it is in fact only one.

https://fedorahosted.org/freeipa/ticket/2195
2012-02-01 12:47:42 -06:00
Endi Sukma Dewata
b73fc6e550 Show password expiration date.
The user details page was modified to show the password expiration
date next to the existing password field.

Fixed problem resetting password in self-service mode. The JSON
interface for the passwd command requires the username to be
specified although the equivalent CLI command doesn't require it.

Ticket #2064
2012-02-01 15:51:50 +01:00
Endi Sukma Dewata
77f0e9aba5 Use fixed font when displaying certificate.
The textareas used to display certificates were modified to use
fixed font.

Ticket #2017
2012-02-01 15:51:31 +01:00
Endi Sukma Dewata
0c4500738b Hide Add/Delete buttons in self-service mode.
Users do not have add/delete permission in self-service mode, so
the search facet was modified to hide the Add/Delete buttons.

Ticket #2188
2012-02-01 15:51:21 +01:00
Endi Sukma Dewata
ea9d5e6f9a Added icons for status column.
The status formatter was modified to show enabled/disabled icon
before the status text.

The format classes were renamed to formatter to avoid confusion
with the format() method. A new parameter 'type' was added to the
formatter to determine the output type (e.g. text/html).

Ticket #1996
2012-02-01 15:51:10 +01:00
Endi Sukma Dewata
6bd2f5ba35 Fixed host managed-by adder dialog.
The host managed-by adder dialog has been fixed to use the new
--not-man-hosts option to filter out hosts that are already added.

Ticket #1675
2012-01-31 08:40:00 -06:00
Petr Voborník
191f05e477 Added paging to DNS record search facet
Paging in DNS record search facet was disabled because there was a mismatch between primary keys sent by server and values displayed in the facet.

The facet was modified to enable paging. To preserve amount of information which was displayed before, current rows have variable height - they can contain more that one line depending on number of values in the record. Each record has a checkbox and indsname in its first line to distinguish one record from others. Because there is only one checkbox for record, delete command is called with --rem-all option which causes that entire record is removed. Individual values can be deleted in record's details facet.

https://fedorahosted.org/freeipa/ticket/2094
2012-01-31 08:39:12 -06:00
Petr Voborník
1f3d8003f7 Modifying DNS UI to benefit from new DNS API
DNS UI was modified to offer structured way of defining DNS records.

https://fedorahosted.org/freeipa/ticket/2208
2012-01-30 17:47:07 -06:00
Petr Voborník
71f9343480 Added refresh button for UI
Web UI is caching records. Currently only possible ways how to display updated record which was changed elsewhere - ie. in CLI are:
 * refresh page in browser (takes really long on slow vpns)
 * search facet: change filter, find, change filter back, find
 * entity details: go to search, select other entry, go back to search, select original entry
 * association facet: same as entity details

These are unconvenient methods.

This patch adds Refresh button to search, details and association facet. This button executes facets refresh method.

https://fedorahosted.org/freeipa/ticket/2051
2012-01-30 17:46:57 -06:00
Endi Sukma Dewata
b353239e59 Fixed inconsistent status labels.
This patch modifies the status attributes in users, DNS zones,
HBAC/sudo rules, HBAC test, and SELinux User Map to use the same
label (i.e. Status) and values (i.e. Enabled/Disabled). The method
to change the status will be modified separately.

Ticket #2247
2012-01-23 15:38:41 +01:00
Endi Sukma Dewata
fef343ae8f Show disabled entries in gray.
The users, HBAC/sudo rules, HBAC test, and SELinux list pages have
been modified to show disabled entries in gray. Icons will be added
separately.

Ticket #1996
2012-01-23 15:38:35 +01:00
Endi Sukma Dewata
7c0c39581c Enabled paging on automount keys.
The automount keys search facet has been modified to support paging.
Since the automountkey-find command doesn't support --pkey-only
option, the facet is configured such that during a refresh operation
it will retrieve all entries (including the key and info attributes)
and then display only the ones that are supposed to be visible in
the current page.

Ticket #2093
2012-01-23 15:38:25 +01:00
Petr Voborník
d906fa50c1 UI for SELinux user mapping
This patch adds UI for SELinux user mapping. Its design is based on HBAC Rule design.

https://fedorahosted.org/freeipa/ticket/2145
2012-01-18 17:08:46 +01:00
Endi Sukma Dewata
7529a79f4b Enabled paging on self-service permissions and delegations.
Paging has been enabled on self-service permissions and delegations
list pages. The search facet's get_pkeys() has been fixed to handle
non-array value. New test data files have been added as well.

Ticket #2092
2012-01-16 20:11:18 +01:00
Endi Sukma Dewata
3bfd49a465 Fixed problem removing automount keys and DNS records.
Due to a recent change the deleting automount keys and DNS records no
longer worked. The functions that are supposed to get the selected
values has been fixed to use the correct names and element type. They
also have been converted into methods of the search facets.

Ticket #2256
2012-01-16 12:24:22 +01:00
Endi Sukma Dewata
f56f8a34d3 Added instructions to generate CSR.
The certificate request dialog box has been modified to show
the OpenSSL commands for generating a CSR.

The realm and entry names in the test data have been fixed to
be more consistent.

Ticket #1012
2012-01-13 10:57:59 -06:00
Petr Vobornik
74857a8ee4 Added IP address validator to Host and DNS record adder dialog
Also fixed minor issues reagarding IP addresses or multivalued field:
 - removed unnecessary method overrides from multivalued_field
 - fixed extract_child_value method in multivalued_widget to return '' instead of empty arrays when value array is empty
 - net.js - changed method name and error message from 'trailing zeros' to 'leading zeros'

https://fedorahosted.org/freeipa/ticket/1466
2012-01-11 00:48:44 -06:00
Petr Vobornik
05345ce8c8 Added support for memberof attribute in permission
The attribute was added to adder dialog and details facet. It uses entity select (group) widget.

https://fedorahosted.org/freeipa/ticket/2101
2012-01-11 00:48:36 -06:00
Endi Sukma Dewata
9dff149830 Load user data and policies in a single batch.
The user details facet has been modified to load the user data,
password policy and Kerberos ticket policy in a single batch
command.

Ticket #703
2012-01-10 18:44:35 +01:00
Endi Sukma Dewata
74e31cd985 Added policies into user details page.
The user details page has been modified to show the password policy
and Kerberos ticket policy that apply to the user. The policies are
currently displayed as read-only.

Ticket #703
2012-01-10 18:42:26 +01:00
Endi Sukma Dewata
2a00393712 Added account status into user search facet.
The user search facet has been modified to show the account status.
The IPA.boolean_format has been converted into a class to allow
behavior customization.

Ticket #1996
2012-01-06 15:25:43 +01:00
Petr Vobornik
ceee08faa1 Fixed IPv6 validation special case: single colon
IPv6 parsing was incorrectly evaluating ':' as a valid IPv6 address.

https://fedorahosted.org/freeipa/ticket/1466
2012-01-03 21:28:53 -06:00
Petr Vobornik
c7ae0c20db Added client-side validation of A and AAAA DNS records
https://fedorahosted.org/freeipa/ticket/1466
2012-01-03 21:28:49 -06:00
Petr Vobornik
911f396604 Added validation logic to multivalued text field
https://fedorahosted.org/freeipa/ticket/1466
2012-01-03 21:28:45 -06:00
Petr Vobornik
747c069c45 Added support of custom field validators
Current validation logic supports only validation based on metadata. It can be extended only by overriding field's validation method. This approach requires creating subclasses of field for each different format of desired value. It's inconvenient for cases like adding the same validation logic to two different subclasses of field.

This patch is adding support for creating custom validators.

Validator is an object which contains validation logic. Validation is executed in a validate(value, context) method. This method checks if the value is valid and returns a validation result. Validation result is a simple object which contains valid property and an error message if valid is false.

Field is extended by validators property. It can be set in spec object or later. It should contain instances of validators for the field. Validators are run in field's validation method.

This patch is a prerequisite for:
https://fedorahosted.org/freeipa/ticket/1466
2012-01-03 21:28:41 -06:00
Endi Sukma Dewata
46d3abc450 Reload UI on server upgrade.
The JSON server has been modified to return the version number
in all responses. The UI has been modified to keep the version
obtained during env operation and check the version returned
in subsequent operations. If the version changes the UI will
reload itself.

Ticket #946
2011-12-21 13:23:08 -06:00
Endi Sukma Dewata
edd37d2019 Reload UI when the user changes.
The JSON server has been modified to return the principal name
in all responses. The UI has been modified to keep the principal
obtained during whoami operation and check the principal returned
in subsequent operations. If the principal changes the UI will
reload itself.

Ticket #1400
2011-12-21 13:22:45 -06:00
Petr Vobornik
78e93c11f6 Parsing of IPv4 and IPv6 addresses
Added support of parsing and validation of IPv4 and IPv6 addresses.
Class IP.address can also create reverse address from any valid IPv4 or IPv6 address.

This functionality is needed for tickets:
https://fedorahosted.org/freeipa/ticket/1466
https://fedorahosted.org/freeipa/ticket/1975
2011-12-21 13:13:06 -06:00
Endi S. Dewata
5fc064f13e Refactored entity object resolution.
The IPA.get_entity() has been modified to accept either entity name
or entity object. If it receives an entity object it will return
the object itself. Otherwise, it will resolve the name in the entity
registry.

The other_entity variables have been modified to store a reference
to the entity object instead of its name. The test cases have been
modified to use real entity objects instead of just the names.

Ticket #2042
2011-12-21 14:59:49 +01:00
Petr Vobornik
49e5555b11 Fixed labels in Sudo, HBAC rules
Fixed regression in labels introduced by refactoring #1515.

https://fedorahosted.org/freeipa/ticket/1515
2011-12-20 21:05:53 +00:00
Petr Vobornik
689f7ba01a Better table column width computing
Columns can have width set or not. Without setting the width it was computed based on tbody width and number of columns. This method is working well if no column has width set. The disadvantage of this approach is that all columns have the same width and so they are not reflecting their possible usage. Flag columns such as 'external' in rule association tables or various 'enable' flags in search facets can be narrower. If we set them fixed small width it will have different size because this width is not currently added to the computation.

This is fixing this problem so dynamic and fixed width can be combined and the columns have desired width.

https://fedorahosted.org/freeipa/ticket/2200
2011-12-17 02:42:45 +00:00
Petr Vobornik
8cb211a24f Distinguishing of external values in association tables
Problem:
Rule association widget was displaying standard records with external records in one table. User couldn't distinguish the values. When clicking on the external record link it navigated to appropriate page for that entity. But for external value there is no record to show so it displayed error.

Solution:
* For tables with possible external values a 'external' column was added. It displays "True" if the value is external and nothing if not. Displaying nothing is intentional. If user sees some text in external column he imidiately knows that the record is external without even reading the "True" text.
* Rows with external values don't have a link for navigating to record page. This prevents showing the error as no record exists.

Additional changes:
* Association table widget was stripped of get_records method. Loading records isn't its resposibility it's a resposibility of field.
* Column was extended by possible suppressing of link creation. It's done by optional suppress_link argument in setup method.
* To allow setting suppress_link attribute in inherited tables a new overridable method was created - setup_column.

Posible future improvements:
* Table is using dynamic setting of width for columns. Each column has the same width. For flag columns such as 'external' the width of the column is too big. It would be better to be able to set smaller fixed width and the rest of the columns width (without the width set) would be computed (to fit the table).
* When a table has displayed buttons in its last column header the cells in column header have different vertical alignmnent. It should be united.

https://fedorahosted.org/freeipa/ticket/1993
2011-12-15 20:00:02 +00:00
Petr Vobornik
187bedafd0 Fixed displaying of external records in rule association widgets
It's a fix for regression introduced by widget refactoring #2040.

https://fedorahosted.org/freeipa/ticket/2040
2011-12-15 19:59:57 +00:00
Petr Vobornik
cb649f2de2 Added facet tabs coloring
Facet tabs are now colored according to their group.

https://fedorahosted.org/freeipa/ticket/1976
2011-12-14 15:44:36 +00:00
Petr Vobornik
7710bfb5bd Association facets are read only in self service
This patch works with assumption that user in self-service mode doesn't have rights for enrolling/un-enrolling himself to/from group, role, hbac rule, net group, sudo rule. He can only read the attributes. Therefore in self service mode all user association facets are set read only.

Checkingi and working with the actual rights would require significantly bigger effort.

https://fedorahosted.org/freeipa/ticket/1972
2011-12-12 19:14:46 +00:00
Endi Sukma Dewata
433cf5b5e7 Fixed combobox search icon position.
A recent CSS change inadvertently changes position of the combobox
search icon. This has been fixed now.

Ticket #388
2011-12-10 01:20:26 +00:00
Endi Sukma Dewata
e8f0c5b9eb Fixed combobox icon position.
A recent CSS change inadvertently changes position of the combobox
icon. This has been fixed now.

Ticket #388
2011-12-09 22:49:34 +00:00
Endi Sukma Dewata
6af4d09e7e Fixed unmatched checkbox name.
The name of the Unmatched checkbox in HBAC Test has been corrected.

Ticket #388
2011-12-09 22:46:40 +00:00
Petr Vobornik
91dc7c3d9a Reordered facets in ACI
Facets in ACI have new order:
* Roles: members, privileges, settings
* Privileges: permissions, settings, roles
* Permissions: settings, privileges

https://fedorahosted.org/freeipa/ticket/2104
2011-12-09 22:46:19 +00:00
Petr Vobornik
34e357e713 Additional better displaying of long names
- facet group headers, error dialog, non-scrollable tables, can manage long names

 Size calculation of scrollable and non-scrollable tables was united. Now these types of tables differ only by style.

https://fedorahosted.org/freeipa/ticket/1821
2011-12-09 22:46:12 +00:00
Endi Sukma Dewata
c1baebe979 Fixed problem loading DNS records.
The DNS records list page was not loaded correctly due to a recent
change in HBAC Test. The page has been updated to use the load_all()
to show all records in the zone.

Ticket #388
2011-12-09 15:55:21 +01:00
Endi Sukma Dewata
7cb39b8e33 Added HBAC Test input validation.
The HBAC Test pages have been modified to validate required input
before executing the test.

Ticket #388
2011-12-09 15:55:13 +01:00
Endi Sukma Dewata
b70ebe5c9f Fixed matched/unmatched checkboxes in HBAC Test
The checkboxes in HBAC Test run page have been fixed to show/hide
matched or unmatched rules. The New Test button has been fixed to
deselect the inputs in all facets. The test data has been updated
as well.

Ticket #388
2011-12-09 15:55:02 +01:00
Petr Vobornik
a1c9e3618c Better displaying of long names in tables and facet headers
Tables columns have computed width. If value in one column is very long it widens the column and shortens others. This change causes that body columns are not aligned with header columns which makes the table less readable.

Applying 'word-break: break-all' style breaks the word to multiple lines and solves the problem.

Simililar problem is in details facet when displaying text values. Very long values widens the table and a horizontal slider is displayed, which is bad. Applying same solution.

In facet headers and breadcrumb navigation breaking the pkey looks bad - there should be only on line of pkey. To solve this, the pkey is limited to 63 characters (empirically measured). Long pkeys are cut. Uncut pkey is set as a title to avoid losing information.

Whole breadcrump could be about 140 chars (with current styles). 10 chars is reserved for entity link, 60 for pkey the rest (about 60) for parent pkeys. The assumtion is that the parent pkeys wouldn't be so long so they won't be cut anyway.

Column width calculation in tables was iproved. Now it counts with cell spacing, padding, border. It uses these assumtions:
cell-spacing: 2px
cell-padding: 6px th:right, left; td: left
cell-border: th:1px; td:0px

It would be better to get these measures dynamically. Right now it is good enough - better than previous calculation.

Result: data cells are aligned with their header. This alignment fails if vertical scrollbar is displayed (existing problem).

Also added padding to headers in association adder dialog.

https://fedorahosted.org/freeipa/ticket/1890
2011-12-09 14:22:25 +01:00
Petr Vobornik
0e8b57b089 Search facets show translated boolean values
Created format method for getting translated messages for boolean values - IPA.boolean_format.

Used in hosts, sudo rules, hbac rules and hbac test.

https://fedorahosted.org/freeipa/ticket/2027
2011-12-08 02:10:34 +00:00
Endi Sukma Dewata
c1d0f72c20 Fixed I18n labels for HBAC Test
Hard-coded labels in HBAC Test have been moved into internal.py to
allow translation.

Ticket #388
2011-12-07 15:33:38 +00:00
Endi Sukma Dewata
6ca3b5c569 Fixed CSS for HBAC Test
The tables in HBAC Test have been modified to expand according to
window size. Hard-coded CSS codes have been moved into ipa.css.

Ticket #388
2011-12-07 15:33:32 +00:00
Endi Sukma Dewata
84019af3f1 Added external fields for HBAC Test.
A text field has been added for specifying external user, host, and
service for HBAC testing.

Ticket #388
2011-12-07 15:33:23 +00:00
Endi Sukma Dewata
fa32699dbf Fixed search filter in HBAC Test.
The search filter in HBAC Test has been fixed to work properly.

Ticket #388.
2011-12-07 15:33:14 +00:00
Endi Sukma Dewata
9276e51bce Fixed navigation buttons for HBAC Test.
The Back, Next, and New Test buttons in HBAC Test have been fixed
to work properly.

Ticket #388
2011-12-07 15:33:06 +00:00
Endi Sukma Dewata
2203bb650c Added HBAC Test page.
This is the initial implementation of HBAC Test page. Currently it
can select user, source/target group, service, rules, and execute
the test. Other functionalities to be implemented include the search
filter, external users/hosts, back/next buttons, validation, styling,
and internalization.

Ticket #388
2011-12-06 22:08:16 +00:00
Endi Sukma Dewata
caa9d52666 Refactored facet.load().
The load() in IPA.facet has been modified to accept the complete
data returned by the server instead of just the result. This is
needed by HBAC Test to access other attributes returned in the
test result.

Ticket #388
2011-12-06 22:08:07 +00:00
Endi Sukma Dewata
a8ea42bda8 Fixed entity metadata resolution.
The current code assumes that an entity will always have a corresponding
LDAPObject on the server, so it looks for the metadata in a fixed location.
This assumption doesn't work for HBAC Test since it is a Command, not an
LDAPObject, so the metadata has to be obtained from a different location.
A new method get_default_metadata() has been added to allow each entity
to find the metadata from the correct location.

Ticket #388
2011-12-06 22:07:52 +00:00
Endi Sukma Dewata
6f0c16e428 Added support for radio buttons in table widget.
The table widget has been modified to support single-valued attribute
using radio buttons needed by some facets in HBAC Test. The widget now
uses 'pagination' flag to determine whether to show the pagination
control. The test data has also been updated.

Ticket #388
2011-12-06 22:07:44 +00:00
Endi S. Dewata
8f642bbe08 Added commands into metadata.
The json_metadata command has been modified to accept some new
options and return the commands metadata. The API.txt has been
updated as well. The UI has been modified to use commands metadata
instead of methods metadata.

Ticket #388
2011-12-06 22:07:35 +00:00
Petr Vobornik
1ffbec9942 Removed usage of bitwise assignment operators in logical operations
JavaScript &= and |= are bitwise operators. They are shortened version of:
 foo = foo & bar
 foo = foo | bar

In some places they were used as shortened version of logical operation and assignment.
 foo = foo && bar

It lead to type conversion to Number which is wrong (0 !== false).

This patch replaces such occurances with full version of logical operation and asignment.

https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:02:11 +00:00
Petr Vobornik
c5ca34f41d Fixed unit tests after widget refactoring
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:02:01 +00:00
Petr Vobornik
2759ea2961 Modifying automount to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:56 +00:00
Petr Vobornik
9a09916108 Changing definition of basic fields in section from factory to type
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:50 +00:00
Petr Vobornik
ab667912cf Code cleanup of HBAC, Sudo rules
https://fedorahosted.org/freeipa/ticket/1515
2011-12-05 16:01:44 +00:00
Petr Vobornik
fdee0892f1 Modifying groups to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:38 +00:00
Petr Vobornik
a902fa4647 Modifying ACI to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:33 +00:00
Petr Vobornik
6e3a21a115 Separation of writable update from field load method 2011-12-05 16:01:29 +00:00
Petr Vobornik
e271e80f7d Modifying services to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:24 +00:00
Petr Vobornik
fcba1cb216 Modifying dns to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:17 +00:00
Petr Vobornik
9b362ce6e1 Modifying hosts to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:11 +00:00
Petr Vobornik
b55d154375 Modifying users to work with new concept
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:01:06 +00:00
Petr Vobornik
5b26a383ce Added possibility to define facet/dialog specific policies
After deleting section as a special type of object a new way of defining inter-field logic is needed.

For this purpose a facet_policy was created. It is a simple object with init() method. Init method should contain logic for attaching to fields' or widgets' events.
When a policy is added to facet or dialog its container property should be set to that facet or dialog. It gives the policy an access to fields and widgets.
Init method should be called after widgets creation.

https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:00:58 +00:00
Petr Vobornik
e021542120 Removing sections as special type of object
Sections are changed into pure widget objects. Introduced IPA.composite_widget, basic widget for widget nesting (it's using IPA.widget_container). It's base class for section widgets.

TODO: change old custom sections into custom fields and widgets.

Note: usage of section in HBAC and SUDO is kept - whole logic will be removed in #1515 patch.

https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:00:50 +00:00
Petr Vobornik
6cdf09812d Builders and collections for fields and widgets
Introduced IPA.field_container and IPA.widget_container.

IPA.field_container: collection for fields. Can set logical container (facet, dialog...) to fields.
IPA.widget_container: collection for widgets. Has basic searching capability withing widget tree.

Introduced field_builder, widget_builder, section_builder, details_builder. All are used for building fields and widgets. Field_builder and widget_builder have the main building logic. Section_builder can create content based on current section spec. Details builder defines a strategy for building content.

https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:00:44 +00:00
Petr Vobornik
863666fbe8 Improved fields dirty status detection logic 2011-12-05 16:00:39 +00:00
Petr Vobornik
4bab6b7e5d Splitting basic widgets into visual widgets and fields
https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:00:32 +00:00
Petr Vobornik
a17bf5e754 Splitting widget into widget and field
Splitting IPA.widget into IPA.field (logical part) and IPA.widget, IPA.input_widget (visual part).

https://fedorahosted.org/freeipa/ticket/2040
2011-12-05 16:00:27 +00:00
Petr Vobornik
fd43a625a2 Added cross browser support of Array.indexOf method
https://fedorahosted.org/freeipa/ticket/2151
2011-12-02 18:35:59 +00:00
Endi Sukma Dewata
e84bd27af2 Fixed entity definition in test cases.
The test cases have been updated to use the new extensible mechanism
for defining and registering entities.

Ticket #2043
2011-11-18 15:57:00 +00:00
JR Aquino
714b0d11ec Replication: Adjust replica installation to omit processing memberof computations
https://fedorahosted.org/freeipa/ticket/1794

If the master does not yet support the total update list feature we still
run the memberof fixup task and not fail to replicate due to the new
attribute not being settable.

Jointly-developed-with: Simo Sorce <ssorce@redhat.com>
Jointly-developed-with: Nathank Kinder <nkinder@redhat.com>
2011-11-14 05:30:06 -05:00
Endi S. Dewata
20ad8fe1ba Removed develop.js.
The develop.js is no longer necessary because the code in it has
been merged into the main code.

An empty extension.js has been added to provide a place for UI
customization.

Ticket #2099
2011-11-14 16:47:10 -05:00
Endi S. Dewata
d6d24be289 Refactored permission target section.
The permission target section has been modified to use widgets
to create the target selection and handle multiple fields.

Ticket #2098
2011-11-14 16:47:08 -05:00
Endi S. Dewata
9405e1a9db Added paging on search facet.
The search facet has been modified to support paging on most entities
using the --pkey-only option to get the primary keys and a batch command
to get the complete records.

Paging on DNS records is not supported because a record may appear as
multiple rows. The following entities do not have --pkey-only option:
Automount Key, Self-Service Permissions, Delegation.

The search and association facet have been refactored to reuse the
common code from the table facet base class.

Ticket #981
2011-11-11 14:44:25 +00:00
Endi S. Dewata
df6bd6ab5a Updated sample data.
New sample data files have been added for search facet paging. Unused
files have been removed. The names used in the files have been updated
for consistency.

Ticket #981
2011-11-11 14:44:21 +00:00
Endi S. Dewata
6802ea7d70 Fixed problem changing page in association facet.
The association facet has been modified to detect page change to
determine whether the facet needs to be updated.

Ticket #1459
2011-11-07 15:07:02 +01:00
Endi S. Dewata
2eb6414372 Added current password field.
The reset password dialog for user has been modified to provide
a field to specify the current password when changing the user's
own password.

Ticket #2065
2011-11-07 14:18:25 +01:00
Petr Vobornik
9378e8b437 Extending facet's mechanism of gathering changes
https://fedorahosted.org/freeipa/ticket/2041

Adding option to gathering changes for update from widgets, sections, details facet.

Changes are represented by update_info { fields [] ((field_info)), commands [] ((command_info))  } object.

* On calling get_update_info() method widget, section and facet returns update_info object which represents all changes in nested objects. Thus usually widgets are creating update_infos, their containers are merging them.
* This object can be then used in details facet update method. In order to use it command_mode = 'init' has to be set. Command mode was introduced to support backward compatibility.
* command_info consists of command and priority. Priority can be set to specify exact exectuting order of commands. It can be defined on facet level by setting widget's priority. When widgit is creating command_info it should pas its priority to it.
2011-11-04 16:54:51 +00:00
Endi S. Dewata
8ca348b99e Added extensible UI framework.
The entity definitions have been converted into classes. The entity
init() method will use the builder to construct the facets and dialogs.
The UI can be customized by creating a subclass of the original entity
in extension.js and then overriding the init() method.

Ticket #2043
2011-11-04 16:51:54 +01:00