Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 10:58 am EDT

Geeklog Forums

How to Check Group Access Right by Default?


Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
I am trying to figure out how to have the "Group" check box in the "Access Rights" area checked by default.

The reason is I gave permission to several people to administer the stories and events and they tend to forget to check the group box and when it is needed to be edited by another person, it can't be edited and became my (root) responsibility to change the access rights. I want it to be checked by default and let them uncheck it only when they really want to keep the access rights for themself.

Sam
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
It depends on what submissions you are talking about. I'll explain briefly for stories, but you will have to do something similar for links, events, polls, etc.

I'll also cross-link this thread with this one, which shows how to cause the "frontpage" selection in the story editor to default to what you want. It's a similar problem, but slightly different.

So, in admin/story.php, find the
Text Formatted Code
    } elseif ($mode == "edit") {
 

line. After that, you should see

Text Formatted Code
        $A['group_id'] = DB_getItem ($_TABLES['groups'], 'grp_id',
                                     "grp_name = 'Story Admin'");
        $A['perm_owner'] = 3;
        $A['perm_group'] = 2;
        $A['perm_members'] = 2;
        $A['perm_anon'] = 2;

 


That is the code you want to examine. To make both group boxes checked, change perm_group from 2 (read_access) to 3 (read/write access). The permissions are a little more complicated than that, but that is basically what they mean. Read the security docs if you are interested in a more in-depth explanation.

Hope that helps!
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Thanks, Turias! A hint is all I needed?

Sam
 Quote

All times are EDT. The time is now 10:58 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content