source: trunk/doc/src/docbook/userdoc/project_permission.xml @ 3332

Last change on this file since 3332 was 3332, checked in by Martin Svensson, 14 years ago

Fixes #526 Read "Projects and the permission system"

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 22.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC
3    "-//Dawid Weiss//DTD DocBook V3.1-Based Extension for XML and graphics inclusion//EN"
4    "../../../../lib/docbook/preprocess/dweiss-docbook-extensions.dtd">
5<!--
6  $Id: project_permission.xml 3332 2007-05-11 13:50:45Z martin $
7
8  Copyright (C) Authors contributing to this file.
9
10  This file is part of BASE - BioArray Software Environment.
11  Available at http://base.thep.lu.se/
12
13  BASE is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License
15  as published by the Free Software Foundation; either version 2
16  of the License, or (at your option) any later version.
17
18  BASE is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  GNU General Public License for more details.
22
23  You should have received a copy of the GNU General Public License
24  along with this program; if not, write to the Free Software
25  Foundation, Inc., 59 Temple Place - Suite 330,
26  Boston, MA  02111-1307, USA.
27-->
28
29<chapter id="project_permission">
30  <?dbhtml dir="project_permission"?>
31  <title>Projects and the permission system</title>
32    <sect1 id="project_permission.permissions">
33      <title>The permission system</title>
34      <para>
35        BASE is a multi-user environment that supports cooperation
36        between users while protecting all data against unauthorized
37        access or modification. To make this possible an elaborate
38        permission system has been developed that allows an user to
39        specify exactly the permission to give to other users and at the
40        same time makes it easy to handle the permissions of multiple
41        items with just a few interactions. For this to work smoothly there
42        are a few recommendations that all users should follow. The first
43        and most important recommendation is:
44      </para>
45     
46      <important>
47        <title>Always use a project!</title>
48        By collecting items in a project the life
49        will be a lot easier when you want to share your data with others.
50        This is because you can always treat all items in a project as one
51        collection and grant or revoke access to the project as a whole.
52      </important> 
53       
54      <sect2 id="project_permission.permissions.levels">
55        <title>Permission levels</title>
56       
57        <para>
58          Whenever you try to create or access existing items in BASE the core will
59          check that you have the proper permission to do so. There
60          are several permission levels:
61        </para>
62       
63        <variablelist>
64          <varlistentry>
65            <term>Read</term>
66            <listitem>
67              <para>
68              Permission to read information about the item, such
69              as the name and description.
70              </para>
71            </listitem>
72          </varlistentry>
73         
74          <varlistentry>
75            <term>Use</term>
76            <listitem>
77              <para>
78              Permission to use the information. In most cases this
79              means linking with other items. For example, if you have permission
80              to use a protocol you may specify that protocol as the extraction
81              protocol when creating an extract from a sample. In the case of plugins,
82              you need this permission to be able to execute them.
83              </para>
84            </listitem>
85          </varlistentry>
86         
87          <varlistentry>
88            <term>Write</term>
89            <listitem>
90              <para>
91              Permission to change information about the item.
92              </para>
93            </listitem>
94          </varlistentry>
95
96          <varlistentry>
97            <term>Delete</term>
98            <listitem>
99              <para>
100              Permission to delete the item.
101              </para>
102            </listitem>
103          </varlistentry>
104
105          <varlistentry>
106            <term>Change owner</term>
107            <listitem>
108              <para>
109              Permission to change the owner of an item. This is implemented
110              as a <link linkend="webclient.items.takeownership">Take ownership</link>
111              function in the web client, where you can take the ownership of 
112              items that you don't already own.
113              </para>
114            </listitem>
115          </varlistentry>
116
117          <varlistentry>
118            <term>Change permissions</term>
119            <listitem>
120              <para>
121              Permission to change the permissions on the item.
122              </para>
123            </listitem>
124          </varlistentry>
125         
126          <varlistentry>
127            <term>Create</term>
128            <listitem>
129              <para>
130              Permission to create new items. This permission can only be
131              given to roles.
132              </para>
133            </listitem>
134          </varlistentry>
135          <varlistentry>
136            <term>Deny</term>
137            <listitem>
138              <para>
139              Deny all access to the item. This permission can only be given
140              to roles.
141              </para>
142            </listitem>
143          </varlistentry>
144     
145        </variablelist>
146        <note>
147          An user's permissions need to be reloaded for the permissions that have been
148          changed should take effect. This is done either manually with the menu choice
149          <menuchoice>
150            <guimenu>File</guimenu>
151            <guimenuitem>Reload permissions</guimenuitem>
152          </menuchoice>
153          or automatically next time the user logs in to BASE.
154        </note>
155
156      </sect2>
157     
158      <sect2 id="project_permission.permissions.checks">
159        <title>How access permissions are checked</title>
160     
161        <para>
162          There are several ways that permission to access an item can
163          be granted to you. The list below is a description of how the
164          permission checks are implemented in the BASE core:
165        </para>
166       
167        <orderedlist>
168          <listitem>
169            <para>
170            Check if you are the root user. The root user has full
171            permission to everything and the permission check stops here.
172            </para>
173          </listitem>
174         
175          <listitem>
176            <para>
177            Check if you are a member of a role that gives you access to the
178            item. Role-based permissions can only be specified based on
179            generic item types and is valid for all items of that type.
180            The role-based permissions also include a special deny permission
181            that can prevents an user from accessing any item. In that case,
182            the permission check stops here.
183            </para>
184          </listitem>
185         
186          <listitem>
187            <para>
188            Check if you are the owner of the item. As the owner you have full
189            permission to the item and the permission check stops here.
190            </para>
191          </listitem>
192         
193          <listitem>
194            <para>
195            Check if you have been granted access to the item by the sharing system.
196            The sharing system can grant access to individual users, groups of
197            users and to projects. We recommend that you always use projects
198            to share your items.
199            </para>
200          </listitem>
201         
202          <listitem>
203            <para>
204            Some items implement special permission checks.
205            For example:
206            </para>
207           
208            <itemizedlist>
209              <listitem>
210                <para>
211                News: You always have read access to news if today's date
212                falls between the start and end date of the news item.
213                </para>
214              </listitem>
215           
216              <listitem>
217                <para>
218                Groups: You have read access to all groups where you
219                are a member.
220                </para>
221              </listitem>
222           
223              <listitem>
224                <para>
225                Users: You have read permission to all users that are members
226                of at least one group where you also are a member. When a project
227                is active, you also have read permission to all users of
228                that project.
229                </para>
230              </listitem>
231           
232            </itemizedlist>
233           
234            <para>
235              There are more items with special permission checks but
236              we don't list those here.
237            </para>
238           
239          </listitem>
240         
241        </orderedlist>
242      </sect2>
243     
244      <sect2 id="project_permission.permissions.plugins">
245        <title>Plugin permissions</title>
246       
247        <para>
248          Another aspect of the permission system is that plugins
249          may also have permissions of their own. The default is that
250          plugins run with the same permissions as the user that invoked
251          the plugin has. Sometimes this can be seen as a security risk
252          if the plugin is not trusted. A malicious plugin can, for example,
253          delete the entire database if invoked by the root user.
254        </para>
255       
256        <para>
257          An administrator can choose to give a plugin only those
258          permissions that is required to complete it's task. If the plugin
259          permission system is enabled for a plugin the default is to deny
260          all actions. Then, the administrator can give the plugin the same
261          permissions as listed above. There is one additional twist to
262          the plugin permission system. A permission can be granted regardless
263          of if the user that invoked the plugin had the permission or not, or
264          a permission can be granted only if the user also has the permission.
265          The first case makes it possible to develop a plugin that allows
266          users to do things that they normally don't have permission to do.
267          The second case is the same as not using the plugin permission system,
268          except that unspecified permissions are always denied when the
269          plugin permission system is used.
270        </para>
271       
272        <note>
273          Plugin developers can supply information about
274          the wanted permissions making it easy for the administrator to
275          just check the permissions and accept them with just a single
276          click if they make sense.
277        </note>
278       
279        <para>
280          See <xref linkend="plugins.permissions"/> for more information.
281        </para>
282       
283      </sect2>
284     
285    </sect1>
286   
287    <sect1 id="project_permission.projects">
288   
289      <title>Projects</title>
290     
291      <para>
292        Projects are an important part of the permission system for several
293        reasons:
294      </para>
295     
296      <itemizedlist>
297        <listitem>
298          <para>
299          They don't require an administrator to setup and
300          use. All regular users may create a project, add items
301          to it and share it with other users. You are in complete
302          control of who gets access to the project, the items it contains
303          and which permission levels to use.
304          </para>
305        </listitem>
306       
307        <listitem>
308          <para>
309          All items in a project are treated as one collection. If a
310          new member joins the team, just give the new person access
311          to the project and that person will be able to access all
312          items in the project.
313          </para>
314        </listitem>
315     
316        <listitem>
317          <para>
318          When you create new items, they are automatically added to the active
319          project so
320          there is almost no need to share items manually. All
321          you have to remember is to set an active project, and
322          this is easy accessible from the
323          <link linkend="webclient.intro.menubar">menu bar</link>.
324          </para>
325        </listitem>
326       
327        <listitem>
328          <para>
329          Filter out items that you don't want to see. When you have set
330          an active project you may choose to only see items that are
331          part of that project and no other items
332          (<xref linkend="webclient.itemlist.presets"/>).
333          </para>
334        </listitem>
335       
336        <listitem>
337          <para>
338          It's easy to share multiple items between projects. Items
339          may be part of more than one project. If you create a new
340          project that builds on a previous one you can easily share
341          some or all of the existing items to the new project from one
342          central place, the <guilabel>Items</guilabel> tab on the project's
343          single-item view.
344          </para>
345        </listitem>
346     
347      </itemizedlist>
348     
349   
350      <sect2 id="project_permission.projects.active">
351     
352        <title>The active project</title>
353       
354        <para>
355          The active project concept is central to the sharing system.
356          You should always, with few exceptions, have a project active
357          when you work with BASE. The most important reason is that
358          new items will automatically be included in the active project.
359          This considerably reduces the time needed for managing access
360          permissions. Without an active project you would have to manually
361          set the permission on all items you create. If you have hundreds
362          of items this is a time-consuming and boring task best to be
363          avoided.
364        </para>
365       
366        <para>
367          If you work with multiple projects you will probably find the
368          filtering function that hides items that are not part
369          of the active project to be useful. As a matter of fact, if you
370          try to access an item that is part of another (not active) project
371          you will get an error message saying that you don't have
372          permission to access the item (unless you are the owner).
373        </para>
374     
375        <sect3 id="project_permission.projects.active.set">
376          <title>Selecting an active project</title>
377         
378          <para>
379            Since it's important to always have an active project
380            there are several ways to make a project 
381            the active one.
382          </para>
383         
384          <itemizedlist>
385            <listitem>
386              <para>
387              The easiest way and the one you will probably
388              use most of the time is to use the
389              <link linkend="webclient.intro.menubar">menu bar</link> shortcut.
390              Look in the menu for the project icon (<guiicon><inlinemediaobject>
391              <imageobject><imagedata fileref="figures/project.gif" format="GIF" /></imageobject>
392              </inlinemediaobject></guiicon>). Next to it, the name of the active project
393              is displayed. If you see <guilabel>- none -</guilabel> here, it
394              means that no project is active. Click on the icon or project name
395              to open a drop-down menu and select a project to set as the active
396              project. If another project is already active it will automatically
397              be unactivated.
398              </para>
399            </listitem>
400         
401            <listitem>
402              <para>
403              Use the <menuchoice><guimenu>File</guimenu>
404              <guisubmenu>Select project</guisubmenu></menuchoice>
405              menu and select the project from the submenu that opens
406              up.
407              </para>
408            </listitem>
409           
410            <listitem>
411              <para>
412              Go to the <link linkend="webclient.intro.homepage">homepage</link>
413              using the <menuchoice><guimenu>View</guimenu>
414              <guisubmenu>Home</guisubmenu></menuchoice> menu and select
415              a project from the list displayed there.
416              </para>
417            </listitem>
418          </itemizedlist>
419         
420          <note>
421            Only one project can be active at a time.
422          </note>
423         
424          <warning>
425            If you change the active project while viewing an item
426            that you no longer has access to in the context of the
427            new project an error message about missing permission
428            will be displayed. Unfortunately, this is all that is displayed
429            and it may be difficult to navigate to a working page again.
430            In the worst case, you may have to go to the login page and
431            login again.
432          </warning>
433         
434        </sect3>
435      </sect2>
436       
437      <sect2 id="project_permission.projects.share">
438        <title>How to give other users access to your project</title>
439       
440        <para>
441          First, you will need to open the <guilabel>Edit project</guilabel>
442          dialog. Here is how to do that:
443        </para>
444       
445        <orderedlist>
446          <listitem>
447            <para>
448            Navigate to the single-item view of your project
449            from the <menuchoice><guimenu>View</guimenu>
450            <guisubmenu>Projects</guisubmenu></menuchoice> list.
451            </para>
452          </listitem>
453         
454          <listitem>
455            <para>
456            Click on the <guibutton>Edit&hellip;</guibutton>
457            button to open the <guilabel>Edit project</guilabel>
458            dialog.
459            </para>
460          </listitem>
461         
462          <listitem>
463            <para>
464            Switch to the <guilabel>Members tab</guilabel>. From this
465            page you can add and remove users and change the access levels
466            of existing ones.
467            </para>
468          </listitem>
469        </orderedlist>
470       
471        <figure id="project_permission.projects.members">
472          <title>Manage members of a project</title>
473          <screenshot>
474            <mediaobject>
475              <imageobject><imagedata contentwidth="10cm" width="10cm" fileref="figures/project_members.png" format="PNG" /></imageobject>
476            </mediaobject>
477          </screenshot>
478        </figure>
479       
480       
481        <helptext external_id="project.edit.members" title="Project members">
482         
483          <variablelist>
484            <varlistentry>
485              <term><guilabel>Members</guilabel></term>
486              <listitem>
487                <para>
488                The members list contains users
489                and groups that are already members of the project. The list
490                shows the name and the permission level. The permission level
491                uses a one-letter code as follows:
492                </para>
493                <itemizedlist>
494                <listitem><guilabel>R</guilabel> = Read</listitem>
495                <listitem><guilabel>U</guilabel> = Use</listitem>
496                <listitem><guilabel>W</guilabel> = Write</listitem>
497                <listitem><guilabel>D</guilabel> = Delete</listitem>
498                <listitem><guilabel>O</guilabel> = Take ownership</listitem>
499                <listitem><guilabel>P</guilabel> = Set permission</listitem>
500                </itemizedlist>
501              </listitem>
502            </varlistentry>
503           
504            <varlistentry>
505              <term><guilabel>Permissions</guilabel></term>
506              <listitem>
507                <para>
508                When you select an user or group in the
509                list the current permission will be checked. To change the
510                permissions just check the permissions you want to
511                grant or uncheck the permissions you want to revoke.
512                You may select more than one user and/or group
513                and change the permissions for all of them at once.
514                </para>
515               
516                <note>
517                In most cases, you should give the project members
518                <emphasis>use</emphasis> permission. This will allow an user
519                to use all items in the project as well as add new items to it.
520                If you give them write or delete permission they will be able
521                to modify or delete all items including those that they don't
522                own.
523                </note>
524               
525                <note>
526                The above note is not always true since the permission to
527                an item in the project also depends on the permission that
528                was set when adding the item to the project. The default
529                permission is <emphasis>delete</emphasis> and the above note
530                holds true. If the item's permission is manually changed to for
531                example, <emphasis>use</emphasis>, no project member can get
532                higher permission to the item.
533                </note>
534               
535              </listitem>
536            </varlistentry>
537           
538            <varlistentry>
539              <term><guibutton>Add users</guibutton></term>
540              <listitem>
541                <para>
542                Opens a popup window that allows you to add
543                users to the project. In the popup window, mark
544                one or more users and click on the <guibutton>Ok</guibutton>
545                button. Unless you are an administrator, the popup window
546                will only list users that are members of at least one of the
547                groups where you also are a member. It will not list users that
548                are already part of the project.
549                </para>
550              </listitem>
551            </varlistentry>
552           
553            <varlistentry>
554              <term><guibutton>Add groups</guibutton></term>
555              <listitem>
556                <para>
557                Opens a popup window that allows you to add
558                groups to the project. In the popup window, mark
559                one or more groups and click on the <guibutton>Ok</guibutton>
560                button. Unless you are
561                an administrator, the popup window will only list groups
562                that you are a member of. It will not list groups that
563                are already part of the project.
564                </para>
565              </listitem>
566            </varlistentry>
567           
568            <varlistentry>
569              <term><guibutton>Remove</guibutton></term>
570              <listitem>
571                <para>
572                Click on this button to remove the selected
573                users and/or groups from the project.
574                </para>
575              </listitem>   
576            </varlistentry>
577          </variablelist>
578         
579         
580          <para>
581            Use the <guibutton>Save</guibutton> button to save your
582            changes or the <guibutton>Cancel</guibutton> button to
583            close the popup without saving.
584          </para>
585        </helptext>
586
587      </sect2>
588     
589      <sect2 id="project_permission.projects.items">
590        <title>Working with the items in the project</title>
591       
592        <para>
593        If you go to the single-item view for a project you will find
594        that there is an extra tab, <guilabel>Items</guilabel>, on that
595        page. Clicking on that tab will display a page that is similar
596        to a list view. However there are some differences:
597        </para>
598       
599        <itemizedlist>
600          <listitem>
601            <para>
602            The list is not limited to one type of item. It can display
603            all items that are part of the project.
604            </para>
605          </listitem>
606         
607          <listitem>
608            <para>
609              It support only a limited set of columns (name, description and
610              owner) since these are the only properties that are common
611              among all items.
612            </para>
613          </listitem>
614         
615          <listitem>
616            <para>
617              The list can't be filtered (except by item type)
618              or sorted. This is due to a limitation in the query system
619              used to generate the list.
620            </para>
621          </listitem>
622        </itemizedlist>
623       
624        <note>
625          The list only works for the active project. For all other
626          projects it will only display items that are owned by the
627          logged in user.
628        </note>
629       
630        <para>
631          There are also several similarities:
632        </para>
633       
634        <itemizedlist>
635          <listitem>
636            <para>
637              It supports all of the regular multi-item
638              operations such as delete, restore, share
639              and take ownership.
640            </para>
641          </listitem>
642         
643          <listitem>
644            <para>
645              Clicking on the name of the item will take you to the
646              single-item view of that item. Holding down <keycap>CTRL</keycap>,
647              <keycap>ALT</keycap> or <keycap>SHIFT</keycap> while clicking,
648              will open the edit popup.
649            </para>
650          </listitem>
651        </itemizedlist>
652       
653        <tip>
654          <para>
655          This list is very useful when you are creating a
656          new project, in which you want to reuse items from
657          an old project.
658          </para>
659         
660          <itemizedlist>
661            <listitem>
662              <para>
663              Activate the old project and go to this view.
664              </para>
665            </listitem>
666           
667            <listitem>
668              <para>
669                Mark the checkbox for all items that you want to
670                use in the new project.
671              </para>
672            </listitem>
673           
674            <listitem>
675              <para>
676                Click on the <guibutton>Share&hellip;</guibutton> button
677                and share the items to the new project.
678              </para>
679            </listitem>
680          </itemizedlist>
681          <para>
682            If you have more than one old project, repeat the
683            above procedure.
684          </para>
685        </tip>
686       
687      </sect2>
688   
689    </sect1>
690       
691</chapter>
Note: See TracBrowser for help on using the repository browser.