Exploit databaseDownload repository ZIP
GH-8c7f0e4b0e998904a1d6f7dcd99e3e7d
d-xuan/cve-2024-52510
Sources for CVE-2024-52510
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files9
d-xuan/cve-2024-52510Revision 6c0d89756ae0
- ↑..Parent directory
- ISystemTag.php
- ISystemTagManager.php
- ISystemTagManagerFactory.php
- ISystemTagObjectMapper.php
- ManagerEvent.php
- MapperEvent.php
- SystemTagsEntityEvent.php
- TagAlreadyExistsException.php
- TagNotFoundException.php
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
lib/public/SystemTag/ISystemTagManager.php
PHP · 4,545 bytes<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCP\SystemTag;
use OCP\IUser;
/**
* Public interface to access and manage system-wide tags.
*
* @since 9.0.0
*/
interface ISystemTagManager {
/**
* Returns the tag objects matching the given tag ids.
*
* @param array|string $tagIds id or array of unique ids of the tag to retrieve
* @param ?IUser $user optional user to run a visibility check against for each tag
*
* @return ISystemTag[] array of system tags with tag id as key
*
* @throws \InvalidArgumentException if at least one given tag ids is invalid (string instead of integer, etc.)
* @throws TagNotFoundException if at least one given tag ids did no exist
* The message contains a json_encoded array of the ids that could not be found
*
* @since 9.0.0, optional parameter $user added in 28.0.0
*/
public function getTagsByIds($tagIds, ?IUser $user = null): array;
/**
* Returns the tag object matching the given attributes.
*
* @param string $tagName tag name
* @param bool $userVisible whether the tag is visible by users
* @param bool $userAssignable whether the tag is assignable by users
*
* @return ISystemTag system tag
*
* @throws TagNotFoundException if tag does not exist
*
* @since 9.0.0
*/
public function getTag(string $tagName, bool $userVisible, bool $userAssignable): ISystemTag;
/**
* Creates the tag object using the given attributes.
*
* @param string $tagName tag name
* @param bool $userVisible whether the tag is visible by users
* @param bool $userAssignable whether the tag is assignable by users
*
* @return ISystemTag system tag
*
* @throws TagAlreadyExistsException if tag already exists
*
* @since 9.0.0
*/
public function createTag(string $tagName, bool $userVisible, bool $userAssignable): ISystemTag;
/**
* Returns all known tags, optionally filtered by visibility.
*
* @param bool|null $visibilityFilter filter by visibility if non-null
* @param string $nameSearchPattern optional search pattern for the tag name
*
* @return ISystemTag[] array of system tags or empty array if none found
*
* @since 9.0.0
*/
public function getAllTags($visibilityFilter = null, $nameSearchPattern = null): array;
/**
* Updates the given tag
*
* @param string $tagId tag id
* @param string $newName the new tag name
* @param bool $userVisible whether the tag is visible by users
* @param bool $userAssignable whether the tag is assignable by users
*
* @throws TagNotFoundException if tag with the given id does not exist
* @throws TagAlreadyExistsException if there is already another tag
* with the same attributes
*
* @since 9.0.0
*/
public function updateTag(string $tagId, string $newName, bool $userVisible, bool $userAssignable);
/**
* Delete the given tags from the database and all their relationships.
*
* @param string|array $tagIds array of tag ids
*
* @throws TagNotFoundException if at least one tag did not exist
*
* @since 9.0.0
*/
public function deleteTags($tagIds);
/**
* Checks whether the given user is allowed to assign/unassign the tag with the
* given id.
*
* @param ISystemTag $tag tag to check permission for
* @param IUser $user user to check permission for
*
* @return bool true if the user is allowed to assign/unassign the tag, false otherwise
*
* @since 9.1.0
*/
public function canUserAssignTag(ISystemTag $tag, IUser $user): bool;
/**
* Checks whether the given user is allowed to see the tag with the given id.
*
* @param ISystemTag $tag tag to check permission for
* @param IUser $user user to check permission for
*
* @return bool true if the user can see the tag, false otherwise
*
* @since 9.1.0
*/
public function canUserSeeTag(ISystemTag $tag, IUser $user): bool;
/**
* Set groups that can assign a given tag.
*
* @param ISystemTag $tag tag for group assignment
* @param string[] $groupIds group ids of groups that can assign/unassign the tag
*
* @since 9.1.0
*/
public function setTagGroups(ISystemTag $tag, array $groupIds);
/**
* Get groups that can assign a given tag.
*
* @param ISystemTag $tag tag for group assignment
*
* @return string[] group ids of groups that can assign/unassign the tag
*
* @since 9.1.0
*/
public function getTagGroups(ISystemTag $tag): array;
}