JA-SIG
Home
About uPortal
Documentation
Getting Started
Developers
Implementors
Users
Background
Release
|
Prerequisites: You should be able to edit groups with the Groups Manager channel and know how
to publish a channel using the Channel
Manager channel.
This tutorial assumes a base distribution, like the
Quick-start, of uPortal version 2.2 or greater. However, it should
work with a locally configured instance of uPortal if you substitute
the names of your own users for the sample names. The
instructions assume Windows, but the Mac and Unix substitutions are
pretty obvious.
- Create a directory called
C:\temp\myGroups\org.jasig.portal.security.IPerson .
In this directory, using a text editor like Notepad, create a new file
named Special_Developers (not Special_Developers.txt). Add
the following 2 lines containing names of portal users:
student
faculty
Save the file .
You have now created a group called Special_Developers
that contains 2 members, student and faculty .
- Edit your composite groups configuration file,
properties/groups/compositeGroupServices.xml
and comment in the filesystem
group service. Change the groups root attribute to "C:/temp/myGroups" .
<service
groupsRoot="C:/temp/myGroups">
<name>filesystem</name>
<service_factory>org.jasig.portal.groups.ReferenceIndividualGroupServiceFactory</service_factory>
<entity_store_factory>org.jasig.portal.groups.filesystem.FileSystemGroupStoreFactory</entity_store_factory>
<group_store_factory>org.jasig.portal.groups.filesystem.FileSystemGroupStoreFactory</group_store_factory>
<entity_searcher_factory>org.jasig.portal.groups.filesystem.FileSystemEntitySearcherFactory</entity_searcher_factory>
<internally_managed>false</internally_managed>
<caching_enabled>false</caching_enabled>
</service>
Save your changes. You have
now made the group you just created available to the composite group
service via a component service named filesystem .
- Start up your portal.
- Log on as
student . You should not see the Channel Admin link in the header
since student does not have permission to render the Channel Manager channel.
Logout Student .
- Logon as
admin . In Groups Manager (on the Admin Tools
tab), expand Everyone , expand Staff , and
select Developers (You are going to make Special_Developers
a member of Developers .)
- Lock
Developers for update and choose Add Members.
- Search for a Group of Persons containing "Special". Groups Manager should find your new
group. Select
Special_Developers and add it to Developers .
- Unlock
Developers and select Special_Developers .
It should have 2 members, Faculty User and Student User.
- Still logged on as
admin , publish a
new channel, giving access only to the group Special_Developers .
Logout admin .
- Log on as
student . You should
now see the Channel Admin link
in the header and be able to publish channels since members of Developers
have permission to render Channel
Manager and student is now a member of Developers
via Special_Developers .
- Subscribe to the new channel via the User Preferences channel.
- Log off
student and log on as developer .
- Try to subscribe to the new channel via the User Preferences channel. You
should not be able to see the
new channel. Both
developer and Special_Developers
are members of Developers , but only members of Special_Developers
have subscribe permission for the new channel.
- Log off
developer and log on as faculty .
You should now be able to subscribe to the new channel. Do so.
- Using your text editor, edit
Special_Developers
and remove faculty from the group by commenting out the faculty
line:
student
#faculty
- Still logged on as
faculty , refresh
your browser. The new channel should still successfully
render. Why? Although faculty is no longer a
member of Special_Developers, the filesystem group service
is externally-managed (you edited it with a text editor). While the
filesystem service itself stays up-to-date by checking file timestamps,
it has no way of knowing what has changed or that previously-cached
membership information for a particular group member is now out of
sync.
- On the other hand, if you remove
Special_Developers
from Developers using Groups
Manager, this change will be visible in real time because Developers
belongs to an internally-managed service. As soon as you refresh faculty's
browser, the Channel Admin link
will disappear from the header. You'll need 2 different user
agents (browser types) on your workstation to try this, one for faculty
and one for admin to make the change in Groups Manager.)
- Log off
and log on once again as faculty. This
time, the new channel should fail to render, and the Error Channel should appear in its
place with the annoying "You are not authorized to view this channel"
message. The Channel Admin
link should also be gone from the header. The memberships for faculty
are now correctly assessed because membership information for a user is
un-cached when the user's session is destroyed.
|