NEWS/InternalStructure
From ThorxWiki
(Difference between revisions)
(Moved from /Implementation) |
m (1 revision(s)) |
Revision as of 02:04, 25 October 2007
You can summarise any NEWS request down to four possibilities.
- Request a page to view
- Request a page to edit
- Preview an edited page
- Save an edited page
So, let's elaborate the stages NEWS goes through for each.
- Request to view
- Security layer checks access permissions of user requesting (via cookies)
- Security layer checks view permissions of page requested (via 'page i/o' module)
- Translation layer fetches the page from i/o and renders it to html
- page is returned to user.
- Request to Edit
- Security checks user permissions
- Security checks edit permissions of page
- If edit is OK, then Translator fetches page and renders it to an edit form
- If edit is not OK, but view is OK, then Translator fetches the page and renders it to 'view raw source'
- page is returned to user
- Preview/save an edit
- Security checks user perms and edit perms of the page
- If edit is OK then feed to Translator which checks for concurrent edits.
- If no concurrent edits, then render the page as page, and ALSO as edit form. (or save page if saving rather than previewing)
- If concurrent editing has occured, then render the new page, show diffs, and show current edited version as edit form.
- If edit is not OK, but view is OK, then Translator renders the changes as 'view raw source', but no further editing.
- If edit is OK then feed to Translator which checks for concurrent edits.
- page is returned to user
- Security checks user perms and edit perms of the page