Commit Graph

16 Commits

Author SHA1 Message Date
Adam Young
07ace112af aci ui
Implements the role, privilege, permission, delegation and selfservice entities ui.

Targetgroup has been added to the object types.
The groups lists need to be filter.  The filter is currently hidden, with a
hyperlink that reads 'filter' to unhide it.  Each keystroke in this filter
performs an AJAX request to the server.

There are bugs on the server side that block some of the functionality from
completing

Creating a Permission requires one of 4 target types. The add dialog in this
version assumes the user will want to create a filter type. They can change
this on the edit page.

Most search results come back with the values as arrays, but ACIs seem not to.
Search and details both required special code to handle non-arrays.

The unit tests now make use of the 'module' aspect of QUnit.  This means that
future unit test will also need to specify the module.  The advantage is that
multiple tests can share a common setup and teardown.

Bugs that need to be fixed before this works 100% are
https://fedorahosted.org/freeipa/ticket/634
https://fedorahosted.org/freeipa/ticket/633
2010-12-20 23:32:06 -05:00
Jakub Hrozek
7493d781df Change FreeIPA license to GPLv3+
The changes include:
 * Change license blobs in source files to mention GPLv3+ not GPLv2 only
 * Add GPLv3+ license text
 * Package COPYING not LICENSE as the license blobs (even the old ones)
   mention COPYING specifically, it is also more common, I think

 https://fedorahosted.org/freeipa/ticket/239
2010-12-20 17:19:53 -05:00
Endi S. Dewata
6350686710 Dialog i18n
The ipa_add_dialog has been fixed to initialize the fields which
will get the labels from metadata. Hard-coded labels have been
removed from field declarations.

The superior() method has been removed because it doesn't work with
multi-level inheritance. Superclass method for now is called using
<class name>_<method> (e.g. widget_init).
2010-12-06 20:16:15 -05:00
Endi S. Dewata
95ea68a217 Column i18n
The ipa_column has been modified to get the label from metadata
during initialization. The ipa_table_widget has been modified to
initialize the columns. Hard-coded labels have been removed from
column declarations.

The ipa_adder_dialog has been modified to execute a search at the
end of setup.
2010-12-06 20:09:38 -05:00
Adam Young
47d61e6cab action panel sibling added function to get sibling entities from the tab set. remove explicit sibling code from entity pages Modified the Label fields on HBAC and SUDO to make them appear cleaner in the UI 2010-12-01 15:21:02 -05:00
Endi S. Dewata
c90bff232d Multicolumn association facet
The association facet has been modified to support multiple columns.
By default the facet will have one column which is the primary key of
the associated object (e.g. username of a group member), so the
existing code will work like before. Other fields (e.g. user's full
name) can be added by subclassing the ipa_association_facet class and
specifying the additional columns to display. These additional fields
will be retrieved using a batch operation.

Previously a single association facet instance will be used for all
associations in an entity. Now each association will have its own
association facet. This way each association facet can be customized
differently as needed. The <entity>-enroll URL parameter has been
removed because it's no longer needed.

The ipa_entity.create_association_facets() is provided to generate
the default association facets with one column for the primary key.

The column click handler has been moved out of ipa_column to provide
more flexibility for customization.

The get_action_panel() and get_client_area() have been modified to
search within the entity's container.

The group entity has been fully converted to use the new UI framework.

Association facets that have been modified to use multiple columns are:
 - User Group's member_user
 - HBAC Service Group's member_hbacsvc
 - SUDO Command Group's member_sudocmd
 - Service's managedby_host

New test data files have been added. Unit tests have been updated.
2010-11-30 14:58:30 -05:00
Adam Young
841c290113 action panel formatting
Cleans up the indentation of the action panel
Puts the sudo and HBAC entries in a consistent order
2010-11-24 20:30:34 -05:00
Endi S. Dewata
b9f539ba19 SUDO Commands and Command Groups
The SUDO Commands and Command Groups pages have been added under
SUDO Rules tab.

Similar to HBAC navigation issue, these entities do not have their
own tab, so an exception has been added to the navigation code
to read sudo-entity parameter to determine the entity being viewed.
Fixing this issue will require framework changes.

New test data for these operations have been added.
2010-11-22 15:37:17 -05:00
Endi S. Dewata
27d8529a84 Fixed action panel queries
Previously the queries for action panel were done globally. Since each
entity container has its own action panel, the queries will return multiple
results. This is fixed by qualifying the query to run within the entity
container.

The query has also been moved into ipa_facet.get_action_panel(). Entities
that do not have their own entity container (e.g. HBAC services and service
groups) will need to override this method to get the action panel from the
right entity container (e.g. HBAC rules).

The facet.setup_views() has been renamed to facet.create_action_panel().
New test data for SUDO rules have been added.
2010-11-22 15:28:42 -05:00
Endi S. Dewata
379a9cc41f SUDO Rule Search and Details Pages
The search and details pages for SUDO Rule have been added. Codes
that are shared with HBAC have been moved to rule.js.

The following methods were renamed for consistency:
 - ipa_details_load() -> ipa_details_refresh()
 - ipa_details_display() -> ipa_details_load()

The ipa_details_cache has been removed because the cache is now
stored in each widget.

The index.xhtml has been removed. All references to it has been
changed to index.html.

The Unselect All checkbox has been fixed. Unnecessary parameter
'container' has been removed.

The unit test has been updated and new test data has been added.
2010-11-19 16:53:30 -05:00
Adam Young
b84b0239f8 HBAC css cleanup
The additions to the search widget have to go one level deeper, as
'container' has both the action panel and the client area

Conflicts:

	install/static/hbac.js
	install/static/hbacsvc.js
	install/static/hbacsvcgroup.js
2010-11-16 11:20:02 -05:00
Endi S. Dewata
9c502641b5 HBAC details page enhancement
The HBAC details page has been enhanced to support Undo and Reset operations.
The functionality is implemented in the base widget class so the behavior
will be more consistent across widgets. A <span> tag now used to define the
field boundary in the HTML doc. The tag contains the visual representation
of the field which include the input tag and optionally the undo link.

The Update method on HBAC details page has been modified so that it executes
several operations using a batch command. The operations being executed
depends on the changes made to the fields. These operations may include:
 - removing access time if access time is changed to any time
 - removing memberships if member category is changed to all
 - modifying rule attributes if description or rule type is changed
 - enabling/disabling the rule if rule status is changed

The behavior of the Add & Remove buttons also has been changed such that
it adjust the category attribute properly in addition to adding the
memberships using batch command. For example, if category is initially
set to all, adding a new member will also change the category to empty.

The ipa_command have been modified to store the on_success and on_error
handlers as properties. When the command is executed as a part of batch
operation, the result of each command will be passed to the appropriate
handler.

The unit tests and test data have been updated as well.
2010-11-15 12:48:45 -05:00
Adam Young
9fa543700b buttons to action panel 2010-11-14 01:53:56 -05:00
Adam Young
59a0c17c54 super to superior 2010-11-14 01:53:52 -05:00
Endi S. Dewata
db11592228 HBAC Service Groups
The HBAC Service Groups search, details, and association pages have
been added under the HBAC tab.

New test data files for HBAC Service Groups have been added. The sample
metadata has been updated as well.
2010-11-11 12:23:05 -05:00
Endi S. Dewata
65c9442e26 HBAC Services
The HBAC Service search and details pages have been added under the HBAC
tab. This requires some changes to the framework.

Currently the navigation framework doesn't support multiple entities under
one tab. As a temporary solution, an 'entity' URL parameter is used to
determine the entity to be displayed. This parameter is now only used by
HBAC tab, but its use might be expanded later. The navigation framework
needs be redesigned to provide more flexibility.

The search page in all entities except DNS records have been changed to
use the ipa_search_widget. The Select/Unselect All checbox and Delete
button now work correctly and consistently.

The Add dialog has been enhanced to render and work in a more consistent
way while still supporting custom widgets & layouts. For the search page,
the Add button will refresh the search results and clear the fields in
the dialog box.

The framework now provides some extension points which can be overriden
by the subclasses:
 - init(): for initialization and configuration
 - create(): for creating the layout dynamically or from template
 - setup(): for setting the look and feel
 - load(): for loading the data

Entity and facet initialization is now done after IPA.init(). This is to
ensure the metadata is loaded first so the entities and facets can use
localized messages/labels/titles.

The group entity has been partially converted to use the new framework.

The unit tests have been updated accordingly.
2010-11-11 12:23:05 -05:00