Home

 

Manage member access to activities

Use administrative commands to change the level of access that members have to one or more activities.

You cannot use the AccessControlService commands to fetch, set, or delete access to community activities. See Communities administrative commands for information about the commands you can use to add a person to a community.

To run administrative commands, use the wsadmin client. See Start the wsadmin client for details.


To manage member access to activities...

  1. Start the Activities Jython script interpreter.

    1. Access the Activities configuration file:

    2. Network deployment:

        execfile("profile_root/config/bin_lc_admin/activitiesAdmin.py")
        

      If prompted to specify which server to connect to, type 1.

      The information about which server to connect to is only used by the wsadmin client when you are running administrative commands to collect statistics.

  2. Find the hash table identifier for the activity or activities for which you want to edit the access levels. Get a list of all activities as hash table values and save it to a variable:

      myactivities=ActivityService.fetchActivities()
      

  3. Identify the activity or activities that you want to edit from the returned list. See Getting a list of activities for more information.

  4. Enter the following command to see the current access levels of the members of a single activity:

      AccessControlService.fetchAccess( java.util.Hashtable activity)
      

    where you specify the hash table identifier of the activity that you want to edit as the activity parameter.

  5. Create a variable that contains information about one or more people to whom you would like to grant access to the activities. Do one of the following:

    • If you are defining the owner of an activity, save the member information as a hash table variable. The setOwnerAccess command expects the member parameter to be provided in hash table format. To do so...

        ActivitiesMemberService.fetchMemberByName(java.lang.String name)
        

    For example:

      jane=ActivitiesMemberService.fetchMemberByName("Jane Fairfax")
      

  6. If you are granting author or reader access, save the member information as a vector variable. The setMemberAccess and setReaderAccess commands expect the member parameter to be provided in vector format. A vector can represent one person or multiple people. A vector contains one or more hash tables. Each hash table contains information for a single person. To save member information as a vector variable...

      ActivitiesMemberService.fetchMembers(java.lang.String filter)
      

    For example:

      allFairfaxes=ActivitiesMemberService.fetchMembers("*Fairfax")
      

    or

      frank=ActivitiesMemberService.fetchMembers("Frank Fairfax")
      

  7. Make the access level changes that you want to make:

    • To grant someone owner-level access to one or more activities:

        AccessControlService.setOwnerAccess( java.util.Vector activities, 
         java.util.Hashtable owner)
        

    For example:

      AccessControlService.setOwnerAccess(myactivities,jane)
      

  8. To grant one person or many people author-level access to one or more activities:

      AccessControlService.setMemberAccess(java.util.Vector activities, 
       java.util.Vector members)
      

    For example:

      AccessControlService.setMemberAccess(activities,allFairfaxes)
      

  9. To grant one person or many people reader-level access to one or more activities:

      AccessControlService.setReaderAccess(java.util.Vector activities, 
       java.util.Vector members)
      

    For example:

      AccessControlService.setReaderAccess(activities,frank)
      

  10. To deny access to a set of members:

      AccessControlService.deleteAccess(java.util.Vector activities, 
       java.util.Vector members)
      


Manage membership

 

Related tasks

Start the wsadmin client

Get a list of activities

 

Related reference


Activities administrative commands


+

Search Tips   |   Advanced Search