~panosl/+junk/django-attachments

« back to all changes in this revision

Viewing changes to README.rst

  • Committer: Martin Mahner
  • Date: 2009-07-22 13:31:13 UTC
  • Revision ID: git-v1:89b298e184a844ca4811373b39f4095db360ee01
Backwards incompatible: This introdues granular permissions for users who should been able to add or delete permissions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
    ./manage.py syncdb
30
30
 
31
 
This app provides a additional permission ``delete_foreign_attachments``
32
 
which enables that users with it can delete foreign attachments. Normally only
33
 
the user who uploaded the attachment can delete it.
 
31
5. Grant the user some permissons:
 
32
 
 
33
   * For **adding attachments** grant the user (or group) the permission
 
34
     ``attachment.add_attachments``.
 
35
 
 
36
   * For **deleting attachments** grant the user (or group) the permission
 
37
     ``attachment.delete_attachments``. This allows the user to delete only
 
38
     attachments which are assigned to him (rather the attachments he uploaded self).
 
39
 
 
40
   * For **deleting foreign attachments** (attachments by other users) grant
 
41
     the user the permission ``attachments.delete_foreign_attachments``.
34
42
 
35
43
Usage:
36
44
======
45
53
 
46
54
    from django.contrib import admin
47
55
    from attachments.admin import AttachmentInlines
48
 
    
 
56
 
49
57
    class MyEntryOptions(admin.ModelAdmin)
50
58
        inlines = [AttachmentInlines]
51
59
 
90
98
==============
91
99
 
92
100
::
93
 
    
 
101
 
94
102
    {% load attachments_tags %}
95
103
    {% get_attachments_for entry as "my_entry_attachments" %}
96
104
    
105
113
    </ul>
106
114
    {% endif %}
107
115
 
108
 
    {% attachment_form entry %}
 
 
b'\\ No newline at end of file'
 
116
    {% attachment_form entry %}
 
117
 
 
118
Changelog:
 
119
==========
 
120
 
 
121
v0.3 (2009-07-22):
 
122
 
 
123
    * This version adds more granular control about user permissons. You need
 
124
      to explicitly add permissions to users who should been able to upload,
 
125
      delete or delete foreign attachments. 
 
126
 
 
127
      This might be **backwards incompatible** as you did not need to assign add/delete
 
128
      permissions before!
 
 
b'\\ No newline at end of file'