PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` * */ namespace OC\Core\Controller; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; use OCP\IRequest; use OCP\License\ILicenseManager; class LicenseController extends Controller { /** @var ILicenseManager */ private $licenseManager; /** * @param ILicenseManager $licenseManager */ public function __construct($appName, IRequest $request, ILicenseManager $licenseManager) { parent::__construct($appName, $request); $this->licenseManager = $licenseManager; } /** * Get the grace period start and end, with the number of apps actively using * the grace period * @return JSONResponse */ public function getGracePeriod() { $gracePeriod = $this->licenseManager->getGracePeriod(true); // change the list of the apps by the counter to avoid exposing info if (isset($gracePeriod['apps'])) { $gracePeriod['apps'] = \count($gracePeriod['apps']); } return new JSONResponse($gracePeriod); } /** * Set a new license string to be used by ownCloud * @param string $licenseString * @return JSONResponse */ public function setNewLicense($licenseString) { $this->licenseManager->setLicenseString($licenseString); return new JSONResponse(); } /** * Remove the license string * @return JSONResponse */ public function removeLicense() { $this->licenseManager->removeLicenseString(); return new JSONResponse(); } /** * Get the information about the state of the license for the target app. * @param string $app * @return JSONResponse */ public function getLicenseMessage(string $app) { return new JSONResponse($this->licenseManager->getLicenseMessageFor($app)); } }