ILockdownManager.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, Robin Appelman <robin@icewind.nl>
  4. *
  5. * This code is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU Affero General Public License, version 3,
  7. * as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Affero General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Affero General Public License, version 3,
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>
  16. *
  17. */
  18. namespace OCP\Lockdown;
  19. use OC\Authentication\Token\IToken;
  20. /**
  21. * @since 9.2
  22. */
  23. interface ILockdownManager {
  24. /**
  25. * Enable the lockdown restrictions
  26. *
  27. * @since 9.2
  28. */
  29. public function enable();
  30. /**
  31. * Set the active token to get the restrictions from and enable the lockdown
  32. *
  33. * @param IToken $token
  34. * @since 9.2
  35. */
  36. public function setToken(IToken $token);
  37. /**
  38. * Check whether or not filesystem access is allowed
  39. *
  40. * @return bool
  41. * @since 9.2
  42. */
  43. public function canAccessFilesystem();
  44. }