diff --git a/doc/_build/doctrees/acknowledgements.doctree b/doc/_build/doctrees/acknowledgements.doctree index 8a1b47a..b038c50 100644 --- a/doc/_build/doctrees/acknowledgements.doctree +++ b/doc/_build/doctrees/acknowledgements.doctree Binary files differ diff --git a/doc/_build/doctrees/environment.pickle b/doc/_build/doctrees/environment.pickle index 8b32899..d3c56de 100644 --- a/doc/_build/doctrees/environment.pickle +++ b/doc/_build/doctrees/environment.pickle Binary files differ diff --git a/doc/_build/doctrees/using.doctree b/doc/_build/doctrees/using.doctree index 91190d6..c4f9a1c 100644 --- a/doc/_build/doctrees/using.doctree +++ b/doc/_build/doctrees/using.doctree Binary files differ diff --git a/doc/_build/html/_sources/acknowledgements.txt b/doc/_build/html/_sources/acknowledgements.txt index f4384f2..4abdd73 100644 --- a/doc/_build/html/_sources/acknowledgements.txt +++ b/doc/_build/html/_sources/acknowledgements.txt @@ -19,7 +19,14 @@ ACL --- -* Middleware ... +* Middleware + + We don't have the Middleware which is required to work with users and it's permissions yet. For this reason we had to tweak some functions to be a hardcoded Demo object. + + * Login Check + At the moment we're using a hardcoded List of allowed usernames and Passwords which are all stored in Plain within the AuthBackends Source File. + * has_perm Decorator + As we don't have a middleware to check for users and it's permissions we do only use one permission at the moment. The permission site domain_admin is hardcoded to user.username == "james@example.com" diff --git a/doc/_build/html/acknowledgements.html b/doc/_build/html/acknowledgements.html index aef3c84..61c9bd2 100644 --- a/doc/_build/html/acknowledgements.html +++ b/doc/_build/html/acknowledgements.html @@ -76,8 +76,26 @@
Middleware
+++We don’t have the Middleware which is required to work with users and it’s permissions yet. For this reason we had to tweak some functions to be a hardcoded Demo object.
++
+- +
+
+- Login Check
+- +
At the moment we’re using a hardcoded List of allowed usernames and Passwords which are all stored in Plain within the AuthBackends Source File.
+- +
+
+- has_perm Decorator
+- +
As we don’t have a middleware to check for users and it’s permissions we do only use one permission at the moment. The permission site domain_admin is hardcoded to user.username == “james@example.com“
+
This document both acts as a test for all the functions implemented in the UI as well as documenting what can be done
Check that only James does have the permission to get the domains administration -#TODO - ACL is hardcoded in auth backend : permission domain_admin → == james@...
+Our own Auth Backend allows the use of Djangos own Permission Decorator which is
+@permission_required(NAME_OF_PERMISSION)
+At the moment we’ve installed this for Domain Administration,
+++++Note
+Please take a look at the ackownledgement to see what is working in this part
+
Get the Domains page and get redirected because Katie who is logged in doesn’t have the Permission
>>> response = c.get('/domains/')
>>> print type(response) == HttpResponseRedirect
True
Logout Katie who isn’t a Domain-Owner and Login James who should be allowed to view this page
>>> c.logout() #katie
-
>>> c.login(username='james@example.com', password='james') #now Domains should work - see tests below
+>>> c.login(username='james@example.com', password='james')
True
Check that the Page now loads correctly
+>>> response = c.get('/domains/')
+>>> response.status_code
+200
+
Check the content to see that we came to the create page after -logging in.
+Domain Administration is called by opening the URL mentioned below. Prequirements like Authorisation and Permissions have been covered before. +Now we do check that the response really does have the correct heading.
>>> response = c.get('/domains/')
+>>> print "Domain Index" in response.content
+True
+
On this page there should be a button which allows to create a new Domain. +If you’re running Mailman for the first time you need to create a Domain before creating Mailinglists. That’s only because each List is Part of a Domain and could not be created without it’s reference.
+>>> '<li class="mm_new_domain"><a href="/domains/new/">New Domain</a></li>' in response.content
+True
>>> response.status_code
-200
->>> print "Domain Index" in response.content #TODO - change heading
-True
-
>>> '<li class="mm_new_domain"><a href="/domains/new/">New Domain</a></li>' in response.content
-True
-
>>> response = c.get('/domains/new/')
-
Then we check that everything went well.
->>> response.status_code
+>>> response.status_code
200
>>> print "Add a new Domain" in response.content #TODO - change heading
True
and create a new Domain called ‘mail.example.com’. -Check that the new Domain exists in the list of existing domains which is above new_domain form
+ + +Each Domain has two main Data Parts, most obvious for a mailinglist we do need a mail_host that’s the part behind the @ when getting an email. In addition we offer you this WebUI for configuration, some may have multiple URLs they can use to access the same installation of mailman. For this reason each Mailinglist gets it’s own web_host as well - which doesn’t need to be unique.
+Testing the Site we do now submit the form we’ve loaded earlier by sending all necessary data in a POST request. The new Domain will be called mail.example.com and available via it’s web_host example.com.
+++Note
+If you do want to use web_host filtering in your webUI you need to remember adding the URL to your /etc/hosts - at least for development
++>>> response = c.post('/domains/new/', ... {"mail_host": "mail.example.com", ... "web_host": "example.com", @@ -213,6 +226,7 @@ >>> response = c.get('/domains/')
>>> response.status_code
@@ -226,43 +240,24 @@
>>> response = c.get('/lists/')
-
>>> response.status_code
+After creating a Domain you should be able to create new Lists. The Button for doing so is shown on the List index Page which should offer a list of all available (adverrtised) lists.
+>>> response = c.get('/lists/')
+>>> response.status_code
200
-
-
->>> "All available Lists" in response.content
+>>> "All available Lists" in response.content
True
-
-
-Try to create a new list.
-And check the content to see that we came to the create page after
-logging in.
+The new List creation form is opened by clicking on the Button mentioned above or accessing the page directly
>>> response = c.get('/lists/new/')
-
-
-
>>> response.status_code
+>>> response.status_code
200
-
>>> print "Create a new List on" in response.content
+>>> print "Create a new List on" in response.content
True
Now create a new list called ‘new_list’. -We should end up on a redirect
+Creating a new List we do need to specify at least the below mentioned items. Those were entered using some nice GUI Forms which do only show up available Values or offer you to choose a name which will be checked during validation. +We’re now submitting the form using a POST request and get redirected to the List Index Page
>>> response = c.post('/lists/new/',
... {"listname": "new_list1",
... "mail_host": "mail.example.com",
@@ -274,46 +269,31 @@
True
List index page should now include the realname of the list
+As List index is an overview of all advertised Lists and we’ve choosen to do so we should now see our new List within the overview. HTTP_HOST is added as META Data for the request because we do only want to see Domains which belong to the example.com web_host
>>> response = c.get('/lists/',HTTP_HOST='example.com')
-
>>> response.status_code
+>>> response.status_code
200
>>> "New_list1" in response.content
True
Four options appear on this page. The first one is to subscribe, -2. to view archives -3. to edit the list settings #at least if you do have permission to do so -4. to unsubscribe
+List summary is a dashboard for each List. It does have Links to the most useful functions which are only related to that Domain. These include the Values mentioned below. _(function) is used to Translate these to you local language.
>>> response = c.get('/lists/new_list1%40mail.example.com/',)
-
>>> response.status_code
+>>> response.status_code
200
->>> "Subscribe" in response.content
+>>> _("Subscribe") in response.content
True
->>> "Archives" in response.content
+>>> _("Archives") in response.content
True
->>> "Edit Options" in response.content
+>>> _("Edit Options") in response.content
True
->>> "Unsubscribe" in response.content
+>>> _("Unsubscribe") in response.content
True