Merge pull request #21717 from owncloud/addpublicgroupinterface

allow apps to add an OCP GroupInterface backend
This commit is contained in:
Thomas Müller 2016-01-15 12:38:18 +01:00
commit 416fb65605
3 changed files with 6 additions and 5 deletions

View File

@ -82,7 +82,7 @@ abstract class OC_Group_Backend implements \OCP\GroupInterface {
* @return int bitwise-or'ed actions * @return int bitwise-or'ed actions
* *
* Returns the supported actions as int to be * Returns the supported actions as int to be
* compared with OC_USER_BACKEND_CREATE_USER etc. * compared with \OC_Group_Backend::CREATE_GROUP etc.
*/ */
public function getSupportedActions() { public function getSupportedActions() {
$actions = 0; $actions = 0;
@ -101,7 +101,7 @@ abstract class OC_Group_Backend implements \OCP\GroupInterface {
* @return bool * @return bool
* *
* Returns the supported actions as int to be * Returns the supported actions as int to be
* compared with OC_GROUP_BACKEND_CREATE_GROUP etc. * compared with \OC_Group_Backend::CREATE_GROUP etc.
*/ */
public function implementsActions($actions) { public function implementsActions($actions) {
return (bool)($this->getSupportedActions() & $actions); return (bool)($this->getSupportedActions() & $actions);

View File

@ -33,6 +33,7 @@
namespace OC\Group; namespace OC\Group;
use OC\Hooks\PublicEmitter; use OC\Hooks\PublicEmitter;
use OCP\GroupInterface;
use OCP\IGroupManager; use OCP\IGroupManager;
/** /**
@ -52,7 +53,7 @@ use OCP\IGroupManager;
*/ */
class Manager extends PublicEmitter implements IGroupManager { class Manager extends PublicEmitter implements IGroupManager {
/** /**
* @var \OC_Group_Backend[]|\OC_Group_Database[] $backends * @var GroupInterface[] $backends
*/ */
private $backends = array(); private $backends = array();
@ -121,7 +122,7 @@ class Manager extends PublicEmitter implements IGroupManager {
} }
/** /**
* @param \OC_Group_Backend $backend * @param \OCP\GroupInterface $backend
*/ */
public function addBackend($backend) { public function addBackend($backend) {
$this->backends[] = $backend; $this->backends[] = $backend;

View File

@ -53,7 +53,7 @@ interface IGroupManager {
public function isBackendUsed($backendClass); public function isBackendUsed($backendClass);
/** /**
* @param \OCP\UserInterface $backend * @param \OCP\GroupInterface $backend
* @since 8.0.0 * @since 8.0.0
*/ */
public function addBackend($backend); public function addBackend($backend);