Commit Graph

84 Commits

Author SHA1 Message Date
2d77bf6de8 Fixed change_password block template. 2015-07-13 18:48:06 +02:00
2d985ba05e Merge remote-tracking branch 'jvelilla/roc_account' into ewf_v1 2015-07-13 18:43:07 +02:00
1b0cc9dc07 Moved initialization from CMS_DEFAULT_SETUP to CMS_SETUP.initialize.
Rely on setup  "admin.installation_access" to determine who has access to /admin/install .
2015-07-13 18:42:16 +02:00
jvelilla
0164c6ec6d Updated Account Info based on review.
Updated Account info with change password form.
2015-07-13 10:25:18 -03:00
jvelilla
2fe2a7f864 Merge branch 'ewf_v1' of https://github.com/EiffelWebFramework/ROC into roc_account 2015-07-13 08:54:50 -03:00
3dec559d58 Process modules installation only for /admin/install request.
This makes installation process safer, and controlled.
2015-07-11 15:39:59 +02:00
jvelilla
dce3f71be9 Added account info, shows basic user info, logout based on login strategy.
Clean block_login.
2015-07-10 15:41:39 -03:00
7f4a7b3ab9 Implemented Module enable/disable setting from configuration.
Implemented dependencies checking to set CMS_MODULE.is_enabled.
Implemented the persistence of CMS_USER.roles
2015-07-10 18:46:16 +02:00
4c8af3ef66 Fixed implementation of path alias settings.
Now report an error if path is already aliased to another location.
2015-07-07 17:20:25 +02:00
jvelilla
f0eff2cb98 Updated basic_auth issue with Javascript. 2015-07-03 09:28:19 -03:00
jvelilla
4f7acc5dbd Updated Javascript roc_basic_auth 2015-07-02 17:19:14 -03:00
jvelilla
9d465b3d7e Updated basic auth module, rename classes to use the prefix CMS_
Updated code based on comments
2015-07-02 14:49:33 -03:00
jvelilla
5288fe4d3c Move generic code for activation, password, reset password, re-activation to
auth module.
Updated Basic Auth module to handle specific content.
2015-07-02 12:56:10 -03:00
jvelilla
9722347736 Fixed issue with roc_auth.js 2015-07-02 10:49:58 -03:00
jvelilla
a2598fff92 Updated clean CMS_AUTHENTICATION_MODULE
Updated basic_auth module to handle templates
All the auth modules depends on CMS_AUTHENTICATION_MODULE
Send mail is done using features from CMS_AUTHENTICATION_MODULE.
Update redirect in roc_auth.js after success login to home.
2015-07-02 10:29:42 -03:00
42e7763528 Added url routing for /files/... and /module/{modname}/files/...
Added CMS_HOOK_RESPONSE_ALTER to give a last chance to alter the response before rendering.
   This hook should not be used, when there are other alternative hook that answer the need, but this is proposed for now, as a way to alter response by adding css, js url, ...
Moved blog under official modules folder.
Cleaned theme of demo example project.
Renamed NODE_MODULE as CMS_NODE_MODULE.
2015-07-01 22:50:19 +02:00
jvelilla
26276dad5d Added OpenId Module.
Better way to present handle authentication strategies in the view using tabs.
2015-06-30 16:54:09 -03:00
8294a47f17 Added usage of notification_email library.
Added CMS_SETUP.mailer
Updated implementation of email_service to use notification_email library
2015-06-30 15:53:02 +02:00
ebc5924c01 Made CMS_MODULE.name deferred, and implemented by constant so that it can be use as static call.
Copied site resources on related module source folder.
Renamed "login" module as "auth" module, and updated related locations and files.
2015-06-29 16:24:17 +02:00
ae9eea99dd Integrate Authentication modules.
Updated code for sql that should not use parameters
   to expand :table_name in table name usage,
   since Eiffel Store will use quote,
   and MySQL does not like them.

Merge remote-tracking branch 'jvelilla/roc_auth_v1' into ewf_v1_mod_env

Conflicts:
	examples/demo/demo-safe.ecf
	modules/auth/cms_authentication_module.e
2015-06-25 23:20:51 +02:00
jvelilla
e17fc570a1 Updated Demo with the new OAuth20 module
Added basic example to extend CMS Authentication using Smarty templates.
2015-06-25 13:20:04 -03:00
ba7ef17d34 Adapted to new layout, with module files inside site/modules/$module_name/... 2015-06-25 17:55:09 +02:00
2886c90782 Moved all location related queries into CMS_API, instead of CMS_SETUP.
Note that CMS_SETUP provides locations set by default or from configuration file.
Now theme related resources can be found under site/modules/$mod_name/... or site/themes/$theme/modules/...
  so only theme related resources can be overriden for now.
2015-06-24 17:15:05 +02:00
6ca8a9ce82 Fixed parts of SQL statements handling (mostly for SQL script execution). 2015-06-19 17:42:02 +02:00
2c72fe6738 Renamed login module as auth (authentication) module 2015-06-19 11:48:42 +02:00
149de898c0 Updated location for cypress the OAuth Eiffel lib.
prepare login module renaming to auth module.
2015-06-19 11:44:41 +02:00
c3133c65a1 Merge remote-tracking branch 'jvelilla/roc_email' into ewf_v1
Conflicts:
	cms.ecf
	examples/demo/demo-safe.ecf
	examples/demo/site/scripts/user.sql
	examples/demo/src/ewf_roc_server.e
2015-06-18 19:17:16 +02:00
f619727997 Fixed persistency layer.
Now we have ODBC .. that accepts various connection string (including SQLite, MySQL,...)
  And EiffelStore+MySQL.
Updated sql scripts to work with MySQL, and SQLite.
Added a sql_statement (s: STRING): STRING that converts ROC sql statement to fit the underlying database engine.
 mostly to adapt incompatibilities such as AUTO_INCREMENT for MySQL and AUTOINCREMENT for SQLite
 by default SQL script should be written following MySQL SQL syntax.
Warning: to use ODBC persistence driver, it has to be installed on the target machine.
2015-06-18 13:55:05 +02:00
Jocelyn Fiat
53491274dc Merged CMS based on concurrent EWF (i.e ewf_v1) with blog branch. 2015-06-15 11:27:44 +02:00
jvelilla
afced59b0c Updated Login Module.
- Refactor raname classes and features.
        - Clean code.
2015-06-11 21:50:27 -03:00
jvelilla
18732a9532 Updated Login Module.
- OAUTH LOGIN: is generic based on a new OAUTH_20_GENERIC_API
        - Storage (at the moment only SQL) for OAUTH_CONSUMER configuration.
        - OAUTH login and callback are generic.
        - Added a OAUTH_20_GENERIC_API.
        - Added scripts and templates to build the new OAUTH tables.
        - Fixed CMS_STORAGE_SQL_I.check_sql_query_validity issue.
        - Extended CMS_STORAGE_SQL_I, to execute scripts with paramerters.
        - Updated filter, now it's generic for every OAUTH consumer.
2015-06-11 10:01:36 -03:00
0b8bee3404 favor EiffelThread for now, while waiting for SCOOP to be fully ready. 2015-06-10 11:06:58 +02:00
jvelilla
f652aa8a15 Update Login Module.
- Updated routes relative to /account/
     - Updated emails with template support.
     - Updated cookie to support the new route.
     - Updated smarty block templates to use the new path.
2015-06-09 19:44:52 -03:00
5578a9e622 Adapted ROC CMS to concurrent EWF.
Revisited the shared logger to reduced number of useless calls.
2015-06-09 19:42:37 +02:00
jvelilla
96ba3c35a2 OAuth2 Gmail
Added OAuth2 GMAIL loggin/logout support.
      Added OAuth2 Gmail filter.
LoginModule
      Updated LoginModule with OAuth2 Gmail support.
Persitence
      Extended user persitance api with OAuth2 gmail features.
      (TODO refactor persistance as an user extention)
2015-06-08 12:58:33 -03:00
jvelilla
032cc5bdcb Updated CMS with Login Module.
-- The module handle basic_auth (at the moment).
     -- Handle login, logout, register user, activate/reactivate an account, password recovery.
     -- Send notification emails.

CMS Updates
     -- Added a new service: email.
     -- Updated Basic Auth Module to handle logout based on the browser type.
     -- Updated persistence layer to save and remove and query activation token and password token.
     -- Updated CMS_USER to handle status {active, not_active, trashed}.
     -- Updated MySQL scripts to be in sync with SQLite scripts
2015-06-05 18:39:27 -03:00
af8f410684 Updated the CMS pagination component.
Harmonized count type to NATURAL_64 for recent_nodes (more to do later).
Fix get is active code.
2015-06-02 15:39:08 +02:00
70d53b3ef1 Provide a default CMS_MODULE.is_installed: BOOLEAN implementation based on storage of custom value.
Now use CMS_MODULE.is_initialized: BOOLEAN as precondition of many routines.
Instantiation of node storage is now done in NODE_MODULE and not any more in CMS_NODE_API.
CMS_NODE_API can be instantiated only by NODE_MODULE.
2015-05-29 19:20:31 +02:00
c871eae10e Renamed node_api and node_storage by blog_api and blog_storage in related CMS_BLOG_* classes. Mainly to avoid confusion with NODE_ classes.
Merged CMS_BLOG_CONFIG with CMS_BLOG_API.
In CMS_BLOG_API, prefer argument of type CMS_USER, rather than using directly user id.
Added a CMS_EDITOR_CONTENT_FORMAT for now, to be the format editable by the WYSIWYG editor.
Added CMS_MODULE.is_initialized: BOOLEAN to equip router, and module_api with expected preconditions.

Fixed typo, especially in log output.
Corrected a few routine names such as add_authors that should not be a function according to its name.
Converted various function returning html content, to procedure appending html content to an output string to minimize temporary string object creation.
Cosmetic: added spaces to make code easier to read, and indentation.
2015-05-27 19:00:32 +02:00
Dario Bösch
e8ff313c28 added some commments 2015-05-22 17:58:46 +02:00
Dario Bösch
0bd75e7c59 Added list of posts of a specific user
Similar to the blog handler the blog user handler routes /blogs/users/{id}. Pagination is implemented as well
2015-05-22 17:31:30 +02:00
Dario Bösch
9b169f70a7 page_number global in blog_handler 2015-05-22 15:43:29 +02:00
Dario Bösch
601b88ab36 blog handler optimized, blog user handler created 2015-05-22 15:34:32 +02:00
Dario Bösch
2b0e1a2b84 Improved structure of blog handler 2015-05-22 14:39:43 +02:00
Dario Bösch
db77c4024d created blog.scss, added link to blogs/{user}
Later we will list all posts of a user under the route blogs/{user}
2015-05-22 14:04:00 +02:00
Dario Bösch
261aeca300 Bugfix: Author was hidden
I had to add the authors to each post after getting the list. Made a helper feature add_authors.
2015-05-22 12:34:30 +02:00
Dario Bösch
027463a910 #3: added pagination links at bottom of the blog page 2015-05-22 12:02:33 +02:00
Dario Bösch
a4c50adefa #3: Calculate and show number of total pages 2015-05-22 11:48:20 +02:00
Dario Bösch
1f61126d22 Configuration File added
Created CMS_BLOG_CONFIG at moved the feature entries_per_page to this new class. The blog hander inherits from the config class
2015-05-22 11:30:54 +02:00
Dario Bösch
fb196735b6 #3: Routet page and limited entries
The blog module routes /blog/{page} and the blog handler limits the entries per page (given as a feature) and sets the offsets according to the given page number
2015-05-22 11:17:34 +02:00