gnowledge/gstudio — pull request #189 by sunnychaudhari (2014-02-18 10:52:40+00:00)
Title: Implemented user group & access policies for resources privacy in metastudio

( NOTE: Before proceed to make latest pull, please first logout from your project otherwise you will have to delete the sqlite database where users have stored. )

1. Implemented user group as follows:

When user logged in for first time , group having logged in username will be created and stored.
After successful login user group will be listed as last option in dropdown menu of groups.
On click of it , user will be redirected to its own group where all his own public and private resources will be displayed.
```
Modified : login.html
Implemented : user_group function in ajax-views.py
```

2. Author class is modified according to store basic details of user. This class is useful when we create relation of Author documents to their own shelf
```
Modified :
models.py
ndf_tags.py
```

3. Added "access_policy" field in Node class. Since we require it for each and every resources public and private policies.
According to the slide button option, named "privacy" in create and edit resource template , resources are restricted and stored with their privacy policies as public and private in corresponding groups
```
Modified :
page_list.html
node_edit_base.html
group.html
quiz_list.html
UploadDoc.html
```
( NOTE: just for differentiation between resources privacy and group privacy because both may have different purpose. )

4. Added privacy feature to Quiz

5. Added "add_policy" script, which runs through all documents and update the "access_policy" field with default value PUBLIC in already created documents in your database.
(NOTE: please make sure that if you made latest pull then just fire this command before running project "python manage.py add_policy" otherwise you will receive the error as "missing field [access_policy]")