mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 23:24:46 -04:00
docs: consolidate docs (#2182)
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
8d46d7e39e
commit
ecffebc43c
307 changed files with 1474 additions and 487 deletions
|
@ -10,9 +10,11 @@ import { DeleteApiRequestBuilder } from '../common/api-request-builder/delete-ap
|
|||
|
||||
/**
|
||||
* Sets the owner of a note.
|
||||
*
|
||||
* @param noteId The id of the note.
|
||||
* @param owner The username of the new owner.
|
||||
* @return The updated note permissions.
|
||||
* @return The updated {@link NotePermissions}.
|
||||
* @throws {Error} when the api request wasn't successful.
|
||||
*/
|
||||
export const setNoteOwner = async (noteId: string, owner: string): Promise<NotePermissions> => {
|
||||
const response = await new PutApiRequestBuilder<NotePermissions, OwnerChangeDto>(
|
||||
|
@ -27,9 +29,12 @@ export const setNoteOwner = async (noteId: string, owner: string): Promise<NoteP
|
|||
|
||||
/**
|
||||
* Sets a permission for one user of a note.
|
||||
*
|
||||
* @param noteId The id of the note.
|
||||
* @param username The username of the user to set the permission for.
|
||||
* @param canEdit true if the user should be able to update the note, false otherwise.
|
||||
* @return The updated {@link NotePermissions}.
|
||||
* @throws {Error} when the api request wasn't successful.
|
||||
*/
|
||||
export const setUserPermission = async (
|
||||
noteId: string,
|
||||
|
@ -48,9 +53,12 @@ export const setUserPermission = async (
|
|||
|
||||
/**
|
||||
* Sets a permission for one group of a note.
|
||||
*
|
||||
* @param noteId The id of the note.
|
||||
* @param groupName The name of the group to set the permission for.
|
||||
* @param canEdit true if the group should be able to update the note, false otherwise.
|
||||
* @return The updated {@link NotePermissions}.
|
||||
* @throws {Error} when the api request wasn't successful.
|
||||
*/
|
||||
export const setGroupPermission = async (
|
||||
noteId: string,
|
||||
|
@ -69,8 +77,11 @@ export const setGroupPermission = async (
|
|||
|
||||
/**
|
||||
* Removes the permissions of a note for a user.
|
||||
*
|
||||
* @param noteId The id of the note.
|
||||
* @param username The name of the user to remove the permission of.
|
||||
* @return The updated {@link NotePermissions}.
|
||||
* @throws {Error} when the api request wasn't successful.
|
||||
*/
|
||||
export const removeUserPermission = async (noteId: string, username: string): Promise<NotePermissions> => {
|
||||
const response = await new DeleteApiRequestBuilder<NotePermissions>(
|
||||
|
@ -83,8 +94,11 @@ export const removeUserPermission = async (noteId: string, username: string): Pr
|
|||
|
||||
/**
|
||||
* Removes the permissions of a note for a group.
|
||||
*
|
||||
* @param noteId The id of the note.
|
||||
* @param groupName The name of the group to remove the permission of.
|
||||
* @return The updated {@link NotePermissions}.
|
||||
* @throws {Error} when the api request wasn't successful.
|
||||
*/
|
||||
export const removeGroupPermission = async (noteId: string, groupName: string): Promise<NotePermissions> => {
|
||||
const response = await new DeleteApiRequestBuilder<NotePermissions>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue