Skip to content

Commit

Permalink
Merge pull request #2426 from JPMeehan/1876-Permission
Browse files Browse the repository at this point in the history
PermissionControl => DocumentOwnershipConfig
  • Loading branch information
kmoschcau authored Nov 10, 2023
2 parents 75727c3 + a168e4b commit 93a3d72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/foundry/client/apps/forms/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "./item";
import "./journal-sheet";
import "./macro-config";
import "./measure-template";
import "./permission";
import "./ownership";
import "./playlist-config";
import "./playlist-sound-config";
import "./roll-table-config";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare global {
* @typeParam Options - the type of the options object
* @typeParam ConcreteDocument - the type of the Document which should be managed by this form sheet
*/
class PermissionControl<
class DocumentOwnershipConfig<
Options extends DocumentSheetOptions<ConcreteDocument>,
ConcreteDocument extends foundry.abstract.Document<any, any> = foundry.abstract.Document<any, any>,
> extends DocumentSheet<Options, ConcreteDocument> {
Expand All @@ -14,7 +14,7 @@ declare global {
* ```typescript
* foundry.utils.mergeObject(super.defaultOptions, {
* id: "permission",
* template: "templates/apps/permission.html",
* template: "templates/apps/ownership.html",
* width: 400
* })
* ```
Expand All @@ -25,10 +25,15 @@ declare global {

override getData(options?: Partial<Options> | undefined): MaybePromise<object>;

protected override _updateObject(event: Event, formData: PermissionControl.FormData): Promise<unknown>;
protected override _updateObject(event: Event, formData: DocumentOwnershipConfig.FormData): Promise<unknown>;
}

namespace PermissionControl {
/**
* @deprecated since v10.
*/
class PermissionControl extends DocumentOwnershipConfig {}

namespace DocumentOwnershipConfig {
interface FormData {
[userId: string]: FormData.InputPermissionLevel;
default: FormData.InputPermissionLevel;
Expand Down

0 comments on commit 93a3d72

Please sign in to comment.