V14: Consistently refer to user key (#14685)

* Fixup UserService

* Fixup PartialViewService

* Fixup ScriptService

* Fixup StylesheetService

* Use keys with usergroups instead of IDs

* Fix missed instances of performingUser

* Fixup DataTypeFolderControllerBase

---------

Co-authored-by: kjac <kja@umbraco.dk>
This commit is contained in:
Mole
2023-08-17 08:35:48 +02:00
committed by GitHub
parent fb3ead87b8
commit a1f6531453
14 changed files with 121 additions and 115 deletions

View File

@@ -9,23 +9,23 @@ public interface IScriptService : IBasicFileService<IScript>
/// Creates a new script.
/// </summary>
/// <param name="createModel"><see cref="ScriptCreateModel"/> containing the information about the script being created.</param>
/// <param name="performingUserKey">The key of the user performing the operation.</param>
/// <param name="userKey">The key of the user performing the operation.</param>
/// <returns>An attempt indicating if the operation was a success as well as a more detailed <see cref="ScriptOperationStatus"/>.</returns>
Task<Attempt<IScript?, ScriptOperationStatus>> CreateAsync(ScriptCreateModel createModel, Guid performingUserKey);
Task<Attempt<IScript?, ScriptOperationStatus>> CreateAsync(ScriptCreateModel createModel, Guid userKey);
/// <summary>
/// Updates an existing script.
/// </summary>
/// <param name="updateModel">A <see cref="ScriptUpdateModel"/> with the changes.</param>
/// <param name="performingUserKey">The key of the user performing the operation.</param>
/// <param name="userKey">The key of the user performing the operation.</param>
/// <returns>An attempt indicating if the operation was a success as well as a more detailed <see cref="ScriptOperationStatus"/>.</returns>
Task<Attempt<IScript?, ScriptOperationStatus>> UpdateAsync(ScriptUpdateModel updateModel, Guid performingUserKey);
Task<Attempt<IScript?, ScriptOperationStatus>> UpdateAsync(ScriptUpdateModel updateModel, Guid userKey);
/// <summary>
/// Deletes a Script.
/// </summary>
/// <param name="path">The path of the script to delete.</param>
/// <param name="performingUserKey">The key of the user performing the operation.</param>
/// <param name="userKey">The key of the user performing the operation.</param>
/// <returns>An operation status.</returns>
Task<ScriptOperationStatus> DeleteAsync(string path, Guid performingUserKey);
Task<ScriptOperationStatus> DeleteAsync(string path, Guid userKey);
}