aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/policy/private/session/groupInfo-pre.php
blob: 97864ffac4847be8004251364d6c8851a6138906 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
    Module:	base/session
*/

    if (_RIGHTS_OK !== true) die();


    $toPolicy = readVariable($_POST['toPolicy'], 'enum',
                readVariable($_GET['toPolicy'], 'enum', _POLICY, $POLICIES),
                $POLICIES
    );
	    	    
    $groupCn = readVariable($_GET['groupCn'],'regreplace',null,array("[^a-zA-Z0-9\ \.\,_:;űáéúőóüöíŰÁÉÚŐÓÜÖÍ\-]"));

// egyelőre csak private-ból lehet valaki admin...
//    if (memberOf(_USERACCOUNT, $AUTH[_POLICY]['adminGroup'])) define('_ACCESS_AS', _ADMIN_ACCESS);

    if (
        _POLICY == 'private' &&
        (
            memberOf(_USERACCOUNT, $AUTH[_POLICY]['adminGroup']) ||
            (
                memberOf(_USERACCOUNT,'diakadmin') &&
                in_array('diak',$userCategories)
            )
        )
    ) define('_ACCESS_AS', _ADMIN_ACCESS);
    else define('_ACCESS_AS', _OTHER_ACCESS); 

    list($backendAttrs,$backendAttrDef) = getBackendAttrs('Group', $toPolicy);

    if ($action == 'changeSettings') {

	changeGroupInfo($groupCn, $toPolicy);

    }
    $groupInfo = getGroupInfo($groupCn, $toPolicy);	// keretrendszer attribútumai
    							// backend attribútumai

    if ($groupInfo===false) $_SESSION['alert'][] = 'page::';

?>