Privs HOWTO v 0.1

skribe <[email protected]> Sat, 31 May 2003 12:24:49 +0800
Newsgroups gmane.comp.cms.xaraya.documentation
Message-ID <[email protected]>
Here's a first draft of the privileges HOWTO.  It's only basic and if you
find any omissions, damn lies, statistics, WMD or have any suggestions please
contact me.

skribe

PS: I've snipped the GFDL from the end for brevity.
PPS: This document is also available in openoffice format.

---HOWTO BEGINS ---
Xaraya Privileges HOWTO
Skribe <[email protected]>

Version 0.1.  31st May, 2003

1. Introduction
1.1 Why this HOWTO?
This HOWTO is designed to be used with Xaraya Beta (v .90x) and may be of
only limited help with other versions.  It aims to teach admins how to set-up
basic privileges for posting comments and submitting articles.

1.2 Assumptions
Xaraya's privilege structure is very configurable so at this stage it would
be impossible to list every possible combination.  Therefore, to give you a
basic familiarity with how the privileges work I have assumed that you have a
default version of the latest Xaraya core Beta (version .903 at the time of
this writing), that you have chosen  the Community Site (with all options
enabled) install and that you have enabled the Articles, Categories and
Comments modules.  It is also assumed that you have created a Main Menu and
listed the modules in it.

1.3 Copyright
	(c)  2003  skribe <[email protected]>
	Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.
	A copy of the license is included in the section entitled "GNU Free
Documentation License".


2. Basic Setup
I like to have all the privileges for the different types of users collected
in different groupings.  This allows me to add, delete or modify them quickly
with a minimum of fuss.  This is in no way a requirement just a personal
preference, Xaraya is extremely fliexible and allows privileges to be applied
to individuals as well as groups.  But this is the easiest way for me to show
you how to use the privilege system.

2.1 Creating a privilege grouping

If you go to Admin -> Users & Groups -> Privileges -> View Privileges you
should see a list of privileges that have already been predefined.  These
should include:
Administration (0 components)
ReadNonCore - with 8 components (DenyAdminPanel, DenyBlocks, DenyDynamicData,
DenyMail, DenyModules, DenyPrivileges, DenyThemes, ReadAccess)

The Administration privilege is for administrators - if you were to click on
it you would see that they are given access to all modules and all components
at admin (the highest) level.

The ReadNonCore privilege is for everyone - including administrators (as we
will see later when assigning privileges to user groups).  If you click on it
you will see that it has no rights associated with it - it is listed as empty
- which for all intents and purposes means that it is simply a privilege
group name.

The components in ReadNonCore define what everyone but administrators can do.
 In summary, it allows non-admin users to read the site but not to change
anything.  They can't submit an article, post a comment or change themes.
This applies whether the visitor is a casual stranger or someone that has
taken the time to create an account and log in.  This is hardly what I'd call
a community site.

In order to change this I want to give the people that bother to log in extra
privileges:  allow them to submit articles, post comments and change themes.
I could do this by adding those privileges to each and every one of them, or
I could assign each privilege to the users' role group I have predefined for
logged in users or I could create a separate privilege grouping for logged in
users, add the necessary components and then assign that to the users' role
group.  I'm going to demonstrate using the last one.

To do this I first create a new privilege group called 'NormalUsers'.  You
can name it anything you like.  I call it normal users because later on I
might wish to set up some other types of users - moderators or article
editors for instance.
To create a new grouping you do this:
1.Admin -> Users & Groups -> Privileges -> Add Privileges
2.In the 'Name' box type in 'NormalUsers'.
3.Leave the radio button on 'Empty'
4.Click 'Add'.

This will bring you back to the same page.  Under 'Current Privileges' in the
'Show Privileges that are:'
Click on the 'All' radio button.
You should see your new 'NormalUsers' privilege listed amongst the current
privileges.  It should have 0 compontents.

2.2 Defining your own privileges.
We now need to define our own privilege.
The first one we'll do is a privilege that will allow normal users to post
comments.  To do this:
1.Click on 'AddPrivilege.
2.Click on the 'with rights' radio button. This should cause the page to load
and new options become available.
3.In module select 'Comments'.  Once again the page should reload.
4.In Level select 'Comment'.
5.In the textbox give your new privilege a name.  I called mine 'AddComment'.
6.In Member Of select 'NormalUsers'.
7.Click 'Add'
You'll need to click the 'All' radio button again to see it but 'NormalUsers'
should now have one component attached: AddComment.

2,3 Assigning a Privilege Group to a Role Group
Now that we have a basic privilege group defined with a rights component
(AddComment) we need to assign this to our Users Role Group.
Admin Menu-> Users & Groups ->Roles- > View All Groups
There should be three predefined Role Groups: Everybody, Administrators and
Users.  Next to each group there should be four icons.
Click on the third icon from the left next to Users.
This will bring up a listing of the privileges for group 'Users'.In the
section Assign a Privilege to Group 'Users'
1.Use the select box to select 'NormalUsers'
2.Click 'Add'.
This should bring up a listing of the assigned privileges for the 'Users'
role group.
Members of the Users group should now be able to post comments.  Allowing
NormalUsers to submit Articles involves the same process except the Articles
module is chosen instead of the Comments Module.

--- HOWTO ENDS---

--
Public key information available at:
http://www.amber.com.au/~skribe/publickey.html
Key fingerprint = A855 9CA3 953B 5195 C518  12F2 0E05 DCCD 5A88 E8A4

Our missions are peaceful -- not for conquest.  When we do battle, it
is only because we have no choice.
		-- Kirk, "The Squire of Gothos", stardate 2124.5

Xaraya Content Management Solutions http://www.xaraya.com/