NEWS/InternalStructure
From ThorxWiki
(Difference between revisions)
m (wiki markup touchup) |
m (markup touchup) |
||
Line 1: | Line 1: | ||
You can summarise any NEWS request down to four possibilities. |
You can summarise any NEWS request down to four possibilities. |
||
− | # Request a page to view |
+ | * Request a page to view |
− | # Request a page to edit |
+ | * Request a page to edit |
− | # Preview an edited page |
+ | * Preview an edited page |
− | # Save an edited page |
+ | * Save an edited page |
So, let's elaborate the stages NEWS goes through for each. |
So, let's elaborate the stages NEWS goes through for each. |
Latest revision as of 15:01, 2 May 2008
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.
[edit] 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.
[edit] 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
[edit] 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