1
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2
|
;; Field Permissions module
|
3
|
;;
|
4
|
;; Original author: markus_petrux (http://drupal.org/user/39593)
|
5
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
6
|
|
7
|
CONTENTS OF THIS FILE
|
8
|
=====================
|
9
|
* OVERVIEW
|
10
|
* USAGE
|
11
|
* REQUIREMENTS
|
12
|
* INSTALLATION
|
13
|
|
14
|
|
15
|
OVERVIEW
|
16
|
========
|
17
|
|
18
|
The Field Permissions module allows site administrators to set field-level
|
19
|
permissions for fields that are attached to any kind of entity (such as nodes
|
20
|
or users).
|
21
|
|
22
|
Permissions can be set for editing or viewing the field (either in all
|
23
|
contexts, or only when it is attached to an entity owned by the current user).
|
24
|
Permissions can also be set for editing the field while creating a new entity.
|
25
|
|
26
|
Permissions for each field are not created by default. Instead, administrators
|
27
|
can enable these permissions explicitly for the fields where this feature is
|
28
|
needed.
|
29
|
|
30
|
|
31
|
USAGE
|
32
|
=====
|
33
|
|
34
|
Once Field Permissions module is installed, you need to edit the field settings
|
35
|
form to enable permissions for each field where you need this feature. You can
|
36
|
choose from three options:
|
37
|
|
38
|
* Public (author and administrators can edit, everyone can view)
|
39
|
* Private (only author and administrators can edit and view)
|
40
|
* Custom permissions
|
41
|
|
42
|
The default value ("Public") does not impose any field-level access control,
|
43
|
meaning that permissions are inherited from the entity view or edit
|
44
|
permissions. For example, users who are allowed to view a particular node that
|
45
|
the field is attached to will also be able to view the field.
|
46
|
|
47
|
"Private" provides quick and easy access to a commonly used form of field
|
48
|
access control.
|
49
|
|
50
|
Finally, if "Custom permissions" is chosen, a standard permissions matrix will
|
51
|
be revealed allowing you full flexibility to assign the following permissions
|
52
|
to any role on your site:
|
53
|
|
54
|
* Create own value for field FIELD
|
55
|
* Edit own value for field FIELD
|
56
|
* Edit anyone's value for field FIELD
|
57
|
* View own value for field FIELD
|
58
|
* View anyone's value for field FIELD
|
59
|
|
60
|
These permissions will also be available on the standard permissions page at
|
61
|
Administer -> People -> Permissions.
|
62
|
|
63
|
|
64
|
INSTALLATION
|
65
|
============
|
66
|
|
67
|
1) Copy all contents of this package to your modules directory preserving
|
68
|
subdirectory structure.
|
69
|
|
70
|
2) Go to Administer -> Modules to install module. If the (Drupal core) Field UI
|
71
|
module is not enabled, do so.
|
72
|
|
73
|
3) Review the settings of your fields. You will find a new option labelled
|
74
|
"Field visibility and permissions" that allows you to control access to the
|
75
|
field.
|
76
|
|
77
|
4) If you chose the setting labelled "Custom permissions", you will be able to
|
78
|
set this field's permissions for any role on your site directly from the
|
79
|
field edit form, or later on by going to the Administer -> People ->
|
80
|
Permissions page.
|
81
|
|
82
|
5) Get an overview of the Field Permissions at:
|
83
|
Administer -> Reports -> Field list -> Permissions
|
84
|
|