Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cd ./tools/docker-dev
tab 2:
```
$ container="$(docker container ls | grep web | awk '{print $1}')"
$ docker exec "$container" -it bash
$ docker exec -it "$container" bash
> cd /var/www/unity-web
> ./vendor/bin/phpunit /path/to/tests
```
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
},
"require-dev": {
"phpunit/phpunit": "<12.1",
"robiningelbrecht/phpunit-coverage-tools": "<2"
"robiningelbrecht/phpunit-coverage-tools": "<2",
"phpstan/phpstan": "^2.1",
"vimeo/psalm": "^6.13"
}
}
21 changes: 21 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true"
findUnusedCode="true"
>
<projectFiles>
<file name="coverage.php" />
<directory name="test" />
<directory name="resources" />
<directory name="webroot" />
<directory name="workers" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
8 changes: 4 additions & 4 deletions resources/lib/UnityLDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,24 +419,24 @@ public function getAllOrgGroupsAttributes($attributes)
public function getUserEntry($uid)
{
$uid = ldap_escape($uid, "", LDAP_ESCAPE_DN);
return $this->getEntry(unityLDAP::RDN . "=$uid," . CONFIG["ldap"]["user_ou"]);
return $this->getEntry(UnityLDAP::RDN . "=$uid," . CONFIG["ldap"]["user_ou"]);
}

public function getGroupEntry($gid)
{
$gid = ldap_escape($gid, "", LDAP_ESCAPE_DN);
return $this->getEntry(unityLDAP::RDN . "=$gid," . CONFIG["ldap"]["group_ou"]);
return $this->getEntry(UnityLDAP::RDN . "=$gid," . CONFIG["ldap"]["group_ou"]);
}

public function getPIGroupEntry($gid)
{
$gid = ldap_escape($gid, "", LDAP_ESCAPE_DN);
return $this->getEntry(unityLDAP::RDN . "=$gid," . CONFIG["ldap"]["pigroup_ou"]);
return $this->getEntry(UnityLDAP::RDN . "=$gid," . CONFIG["ldap"]["pigroup_ou"]);
}

public function getOrgGroupEntry($gid)
{
$gid = ldap_escape($gid, "", LDAP_ESCAPE_DN);
return $this->getEntry(unityLDAP::RDN . "=$gid," . CONFIG["ldap"]["orggroup_ou"]);
return $this->getEntry(UnityLDAP::RDN . "=$gid," . CONFIG["ldap"]["orggroup_ou"]);
}
}
2 changes: 1 addition & 1 deletion resources/lib/UnityOrg.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function inOrg($user, $ignorecache = false)

public function getOrgMembers($ignorecache = false)
{
$members = $this->getGroupMemberUIDs($ignorecache);
$members = $this->getOrgMemberUIDs($ignorecache);
$out = array();
foreach ($members as $member) {
$user_obj = new UnityUser(
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/phpopenldaper