summaryrefslogtreecommitdiffstats
path: root/ipsilon/admin/login.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix file permissions and remove shebang'sPatrick Uiterwijk2014-12-161-2/+0
| | | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Refactor plugin initialization and enablementSimo Sorce2014-11-121-12/+0
| | | | | | | | | | | | Move most plugin enablement and initialization code in plugin.py to reduce code duplication and simplify and unifify plugin enablement for all base plugin types (login, info, providers). This patch breaks backwards compatibility as it changes how the list of enabled plugins is stored in the database tables. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Improve UI for enabling/disabling plugins configSimo Sorce2014-10-271-160/+6
| | | | | | | Use the same templates for both info and login plugins Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add auto-auth requirement to all admin pagesSimo Sorce2014-10-071-2/+1
| | | | | | | | | | Instead ofhaving to explicitly decorate all methods with auth_protect() use the fact all pages go through Page.__call__ to conditionally check if the user is anoynous and set a default when instantiating AdminPage so that all admin pages require authentication. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Add AdminPage abstraction on top of util.PageSimo Sorce2014-10-071-3/+3
| | | | | | | | | | This is to allow different default headers between Admin pages and other pages. In particular we set no-caching headers to all admin pages to force browsers to refresh as often as possible. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Fix exposed functionsSimo Sorce2014-10-071-2/+2
| | | | | | | | | | | | The Page util is supposed to intercept and enable exposed pages on its own so that additional functions can be run in the generic __call__ Fix the code to check for the function argument correctly and use a different argument than the standard cherrypy one for admin pages so that we do actually land in the Page.__call__ all the time for those pages. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Redirect anonymous users awaySimo Sorce2014-10-061-1/+4
| | | | | | | | | It makes no sense to let anonymous users interact with the admin pages so tighten up access and redirect away users that have no rights. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Fix storing login plugin status and orderSimo Sorce2014-10-061-6/+25
| | | | | | | | | | | | When plugins were enabled or disabled their status was not stored in the database, unless the order was explicitly manipulated. Moreover if the order was changed that fact would not be refrlected in the actual authntication order until a restart. Fix the code to always permanently store the enabled/disabled status, and to immediately change the authentication order. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Fix E501 line too long errorsSimo Sorce2014-05-201-2/+4
| | | | Signed-off-by: Simo Sorce <simo@redhat.com>
* Fix broken login plugins order config handlingNathan Kinder2014-05-101-13/+18
| | | | | | | | | | | | | | | | | | | | | | The administrative page for configuring login plugins order had a number of problems. The html template expects a list of plugin names to be supplied, but a list of the actual plugin objects was being supplied. This caused a 500 error since join() would throw an exception when it encounters something other than a string. Even after fixing the 500 error, actually modifying the plugin order would not work due to further issues with plugin objects being used when strings representing the plugin names are expected (and vice-versa). This patch ensures that strings representing plugin names are supplied to the html template, and that plugin objects are used when re-ordering the live plugin list. Resolves: https://fedorahosted.org/ipsilon/ticket/2 Signed-off-by: Nathan Kinder <nkinder@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
* Convert all forms to use util.Page form supportSimo Sorce2014-04-211-7/+1
| | | | | | This way all forms will get Referer checking automaticaly Signed-off-by: Simo Sorce <simo@redhat.com>
* Refactor login plugin enablement codeSimo Sorce2014-03-281-2/+36
| | | | | | | This allows us to finally implement the plugin enable/disable configuration buttons and enable/disable plugins on the fly. Signed-off-by: Simo Sorce <simo@redhat.com>
* Automatically build configuration page menuSimo Sorce2014-03-281-10/+14
| | | | | | Do not hardcode it, rather build it out of the pages tree. Signed-off-by: Simo Sorce <simo@redhat.com>
* Move login plugin configuration to its own moduleSimo Sorce2014-03-261-0/+118
move also the template, in preparation for handling other configuration data in the main page. Signed-off-by: Simo Sorce <simo@redhat.com>