Commit Graph
100 Commits
Author SHA1 Message Date
jocelyn f9ecd4956f Keep the until date in the form data, so that new filter will remember the until date. 2015-09-09 23:12:52 +02:00
jocelyn 18e159ad3c Simplified the add child mechanism, by using a query parameter ?parent=nid
(instead of specific node/{nid}/add_child/page url)
Fixed implementation of `CMS_NODE_API.is_node_a_parent_of (..)',
  and improved parent validity checking against cycle.
2015-09-09 23:04:08 +02:00
jocelyn 438259033a Renamed link "Trash" to "Move to trash". 2015-09-09 22:10:13 +02:00
jocelyn 62e74ea6cd Refactor notion of trash and delete.
- Trash a node now does a soft delete (move to trash container).
 - Delete a node now remove it from the storage (no undo).

Signed-off-by: jvelilla <javier.hector@gmail.com>
2015-09-09 22:05:23 +02:00
jocelyn 32a409b7e9 Refactored add child feature, to have all the page specific code in CMS_PAGE_NODE_TYPE_WEBFORM_MANAGER (and not in the general node code).
Note that ideally PAGE could be a separated page node module (as it is for blog).
Added listing of children for each "page".
2015-09-09 21:58:16 +02:00
jocelyn 5f4eb2cf10 Correct implementation of node extension save operation. 2015-09-08 20:44:00 +02:00
jocelyn 88bc52fffb Updated roc script, install module for the examples, and updated demo site folder. 2015-09-08 16:03:36 +02:00
jocelyn 2431d7af6c Improved the recent changes modules:
- extracted from populate_recent_changes, the recent_changes_sources that enables to filter early.
Added author_name to the CMS_RECENT_CHANGE_ITEM to support author which is not related to any CMS_USER.
Implemented the simple filtering on source and add parameters size and date.
2015-09-03 14:47:17 +02:00
jocelyn ad4f020d0e The NULL storage may look into the CMS configuration file.
This allows to run the CMS without any database.
2015-08-21 19:16:31 +02:00
jocelyn 7a13b47131 Fixed cms library compilation.
CMS_FILE_BLOCK was missing `is_empty' implementation.
2015-08-19 12:34:35 +02:00
jocelyn 923089baa1 Better js code to apply CKEditor.replace, mainly to select only textarea.name=$name.
code cleaning.
2015-08-18 19:24:18 +02:00
jocelyn cfec9dc7f8 Do not include empty blocks, this way, we avoid empty sidebars if not needed. 2015-08-18 10:58:31 +02:00
jocelyn b5e7d5d201 Require "view recent changes" permission to see the recent changes. 2015-08-17 17:40:55 +02:00
jocelyn e1bdcb965c Added permission arguments to "trash" and "Create" links.
Added blocks configuration settings via the cms.ini and "blocks" section
   ex: [blocks]
       navigation.region=sidebar_first
   This enables the site to change default block location, and even hides it easily, if the theme does not include associated region name.
2015-08-13 00:44:16 +02:00
jocelyn 0061afcbe8 use "deleted" instead of "trashed" . 2015-08-12 19:03:40 +02:00
jocelyn 6a9bc8aa42 Updated admin and recent_changes module permissions declaration. 2015-08-12 19:00:17 +02:00
jocelyn 1d7d79d69e Cleaned up hooks related code, and always go via CMS_RESPONSE.hooks 2015-08-12 17:50:23 +02:00
jocelyn 46014da3d8 Added recent_changes module.
Revisited hooks management, and added new CMS_HOOK_MANAGER.
Added admin, and other link into navigation menu that goes into first sidebar.
Fixed theme info, and template for sidebar ids.
Better css class name for cms node content.
2015-08-12 17:30:07 +02:00
jocelyn 7cb4c0e9f4 Quick fix for ROC CMS links in authentication email templates. 2015-08-10 12:55:10 +02:00
jocelyn aff6b07c80 Fixing edit node form field title and id. 2015-08-10 12:49:40 +02:00
jocelyn 479194d6c5 Updated node module sql script file to support revisions. 2015-08-10 11:21:04 +02:00
jocelyn 3f123dd921 Cosmetic/comments. 2015-08-10 10:04:08 +02:00
jocelyn cd0c2acd87 Added revisions support to node management.
Updated node extension implementation.
Updated known permissions for node module.
Improved code for node storage extension , in preparation to code factorization.
Ensured that author is updated when saved.
2015-08-07 19:17:25 +02:00
jocelyn 44ada4b6b1 Fixed demo module. 2015-08-07 19:13:01 +02:00
jocelyn 8efbddc8cb Removed unused local variables. 2015-08-06 11:52:47 +02:00
jocelyn f26b81977c Implemented CMS_LINK.is_forbidden in all descendants. 2015-08-06 11:52:35 +02:00
jocelyn bbf7456fa2 Improve permissions list display, to be sorted.
Better permission names for "admin users" and "admin roles".
2015-08-04 16:42:06 +02:00
jocelyn 62ef07c86b Removed unwanted files. 2015-08-04 15:22:11 +02:00
jocelyn a422dea15d Improved message after successful role creation.
Removed useless code.
2015-08-04 14:56:55 +02:00
jocelyn 6fb7bf9a1d Updated location of http_authorization library (now under library\web\authentication\..) 2015-08-04 13:27:09 +02:00
jocelyn bba1d57ce3 Fixed and improved various issue in admin module (especially the Role editing which was not working as expected.)
Added CMS_MODULE.permissions to allow module to declare the potential permissions.
Added support for CMS_LINK.is_forbidden, in relation with CMS_LOCAL_LINK.permission_arguments.
Split link "username (Logout)" into 2 links "username" and "logout".
Fixed/Changed the way auth modules alter the logout link based on "(Logout)" title, by safer solution based on `location' of the link.

Fixed usage of WSF_REQUEST.path_info by using percent_encoded_path_info which is not non unicode path info to be used most of the time.
Merged CMS_REPONSE.variables and CMS_REPONSE.values .
When possible, prefer usage of CMS_RESPONSE.user instead of CMS_REQUEST_UTIL.current_user (WSF_REQUEST) whenever it is possible.
When possible, prefer usage of CMS_RESPONSE.location, rather than usage of WSF_REQUEST.(percent_encoded_)path_info .
Code cleaning.
2015-08-04 12:48:14 +02:00
jocelyn c271f839e2 Merge remote-tracking branch 'jvelilla/roc_admin' into ewf_v1 2015-08-03 14:05:03 +02:00
jocelyn 5d81f1d195 Improve previous commit to show allowed tabs only if user has access to it. 2015-08-03 12:56:05 +02:00
jocelyn 500f8f78a4 Fixed implementation of CMS_USER_STORAGE_SQL_I.update_user_roles 2015-07-16 20:22:20 +02:00
jocelyn 47573a1950 Added permissions "$action any node" , "$action own node" for now. 2015-07-16 20:03:07 +02:00
jocelyn 43b8c52d34 Merge remote-tracking branch 'ewf/ewf_v1' into ewf_v1 2015-07-16 17:18:58 +02:00
jocelyn d8ac46f8b0 Added CMS_NODE.is_published and is_trashed: BOOLEAN
For now, whenever we save a node, it is marked as published.
Display a node only if published.
Updated /trash page.
Updated /nodes/ page to take into account the node status.
2015-07-16 17:16:35 +02:00
jocelyn 769c14caf8 Display the OAuth association only in "account" page.
Improved the template to show only when pertinent.
2015-07-16 15:49:14 +02:00
jocelyn 3c0122d98f Fixed validation of node path alias field, for node creation.
Now,when installation a module, store the version (instead of just "yes")
2015-07-16 15:23:56 +02:00
jocelyn f55a52e4d0 Added CMS_USER_API.save_user_role (a_user_role) 2015-07-14 19:52:39 +02:00
jocelyn 2040a746dd Cleaned auth module by removing useless code.
Added CMS_USER_API.user_role_by_name (a_name: READABLE_STRING_GENERAL): detachable CMS_USER_ROLE
Added enabled/disabled status in admin/install.
2015-07-14 18:59:09 +02:00
jocelyn 5688cffcf1 Fixed wrong error report for path alias validation. 2015-07-14 12:47:59 +02:00
jocelyn 19e8607e54 Removed unused local variable
Use new location for http_authorization library.
Added error_handler in CMS_MODULE_API (and thus all modules).
Better error handling in CMS_USER_API.
2015-07-14 12:20:43 +02:00
jocelyn 2d77bf6de8 Fixed change_password block template. 2015-07-13 18:48:06 +02:00
jocelyn 2d985ba05e Merge remote-tracking branch 'jvelilla/roc_account' into ewf_v1 2015-07-13 18:43:07 +02:00
jocelyn 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
jocelyn 3dec559d58 Process modules installation only for /admin/install request.
This makes installation process safer, and controlled.
2015-07-11 15:39:59 +02:00
jocelyn 3ea9e36e7c Updated comments. 2015-07-10 19:08:29 +02:00
jocelyn 5da01fd576 Fixed issue with CMS_USER_STORAGE_SQL_I.update_user which was passing useless parameters. 2015-07-10 18:57:56 +02:00
jocelyn 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
jocelyn 779064a505 In SQL statement use the same case for table names, i.e all lowercase.
Otherwise on Linux+MySQL queries may fail.
2015-07-10 12:58:05 +02:00
jocelyn 5477bab83c Added error handler argument in CMS_STORAGE_BUILDER.storage (...) function.
Removed testing purpose code.
Update debug module.
2015-07-10 12:20:28 +02:00
jocelyn d24f124e42 Fixed typo in renamed features. 2015-07-09 21:31:09 +02:00
jocelyn bace9657b4 Search module configuration first in site/config/modules/$module_name/ folder to see if default is overriden,
and then in site/modules/$module_name/config/ folder.
2015-07-09 21:29:35 +02:00
jocelyn 6319d46f26 Added back CMS_FORMATS.filtered_html 2015-07-09 13:47:22 +02:00
jocelyn 31095b1b66 Merged formats, from CMS_NODE_API and CMS_API, into CMS_API.formats: CMS_FORMATS. 2015-07-09 13:41:42 +02:00
jocelyn 16cae0047d Revisited the format, filter and content type integration.
Now, all formats used by CMS are instances of CMS_FORMAT, mainly to prepare the admin section in order to define format by config/database.
CMS_NODE_API provides all queries to access the content types, and formats, this way a module can easily alter the formats by adding a new filter.

TODO: see how to integrate permission checking, to control who can use a specific format (such as full HTML).
2015-07-09 12:23:20 +02:00
jocelyn 85cff0b139 Better implementation of CMS_API.source_of_path_alias (a_alias).
That now returns the path, only if the alias exists, otherwise returns Void.
Improved path alias validation.
2015-07-07 17:40:12 +02:00
jocelyn cc94c59eed Added CMS_USER.utf_8_name: STRING_8 for convenience.
Added a permission check for registering (TODO: by default allow visitor to register).
Cosmetic.
2015-07-07 17:25:56 +02:00
jocelyn 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
jocelyn 37729f648a Merge remote-tracking branch 'ewf/ewf_v1' into ewf_v1 2015-07-03 19:35:43 +02:00
jocelyn 26dc018893 Added CMS_API.new_email (..): CMS_EMAIL to help CMS_EMAIL creation. 2015-07-03 19:32:49 +02:00
jocelyn 011a6b7804 Updated auto register hook with new {CMS_HOOK_RESPONSE_ALTER} 2015-07-03 09:37:40 +02:00
jocelyn 83e7f95425 Fixed location of .ecf file related to ROC CMS. 2015-07-03 09:33:41 +02:00
jocelyn 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
jocelyn eb9ac980e6 Added integration configuration file all-safe.ecf
Fixed various compilation error
2015-06-30 18:18:01 +02:00
jocelyn 28ab4786a1 Provided a CMS_EMAIL, and CMS_API.process_email (CMS_EMAIL) 2015-06-30 16:11:49 +02:00
jocelyn 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
jocelyn e45dac84c8 Removing unused local variables.
Fixed .ecf location for cms related libraries.
2015-06-29 18:42:11 +02:00
jocelyn bb3e3b992f Merge branch 'ewf_v1_roctool' into ewf_v1 2015-06-29 17:30:39 +02:00
jocelyn 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
jocelyn 48b0ad5195 Merge remote-tracking branch 'jvelilla/roc_tool' into ewf_v1_roctool 2015-06-26 11:25:12 +02:00
jocelyn 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
jocelyn ba7ef17d34 Adapted to new layout, with module files inside site/modules/$module_name/... 2015-06-25 17:55:09 +02:00
jocelyn 04e98dbb48 Merge remote-tracking branch 'ewf/ewf_v1' into ewf_v1 2015-06-24 18:51:33 +02:00
jocelyn 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
jocelyn 0fca03a4d1 Improved Authentication module code.
Updated to match recent changes from cypress the OAuth Eiffel library.
2015-06-22 21:47:06 +02:00
jocelyn 642b901856 Make sure CMS_BLOCK knows about page variables values.
For now only for smarty template blocks.
2015-06-19 22:48:20 +02:00
jocelyn 4f3bcf290f Fixing issue with index. 2015-06-19 17:58:09 +02:00
jocelyn 6ca8a9ce82 Fixed parts of SQL statements handling (mostly for SQL script execution). 2015-06-19 17:42:02 +02:00
jocelyn 2c72fe6738 Renamed login module as auth (authentication) module 2015-06-19 11:48:42 +02:00
jocelyn 149de898c0 Updated location for cypress the OAuth Eiffel lib.
prepare login module renaming to auth module.
2015-06-19 11:44:41 +02:00
jocelyn 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
jocelyn 967871e427 Removed inheritance from obsolete classes. 2015-06-18 14:46:22 +02:00
jocelyn 73e0098c4d Removed persistence sqlite folder which is now obsolete. 2015-06-18 14:23:30 +02:00
jocelyn b4407378db Fixing compilations for test suites related to persistency. 2015-06-18 14:07:41 +02:00
jocelyn 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 e37dbb0a62 Merge branch 'blog_ewf_v1' into ewf_v1 2015-06-16 21:07:40 +02:00
jocelyn 21800e71d3 Removed obsolete calls.
Updated code to make it clear what is the resource, and what is the associated module resource path.
2015-06-11 23:03:34 +02:00
jocelyn 0fc1cb68ad Apply recent changes from EWF v1 2015-06-10 18:39:41 +02:00
jocelyn 0b8bee3404 favor EiffelThread for now, while waiting for SCOOP to be fully ready. 2015-06-10 11:06:58 +02:00
jocelyn 53a602d33c Removed CMS_SERVICE
Updated install.bat script
2015-06-10 09:43:04 +02:00
jocelyn 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
jocelyn b8cfff487a Removed dependency from pagination to cms_data_query_parameters
TODO: review and fix any NATURAL_64 truncation.
2015-06-02 15:56:27 +02:00
jocelyn 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
jocelyn cede341301 Merged remote-tracking branch 'jvelilla/roc_pg' into pagination
Renamed pagination related classes, and moved them to cms library under "support" cluster.
2015-05-31 22:43:19 +02:00
jocelyn 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
jocelyn 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
jocelyn b77c5cd93c Added abstraction of cms storage on file system. (mostly helpers features). 2015-05-22 23:04:09 +02:00
jocelyn 77f52388c1 Improved site_url and base_url interface and initialization.
Added CMS_CUSTOM_RESPONSE_MESSAGE interface to send easily simple response message.
Updated CMS_RESPONSE to use CMS_CUSTOM_RESPONSE_MESSAGE
2015-05-22 22:37:18 +02:00