@@ -87,9 +87,6 @@ object ModelServerPermissionSchema {
8787 includedIn(REPOSITORY , REWRITE )
8888 description(" Destructive write operations that change the history and loses previously pushed changes." )
8989
90- permission(FORCE_PUSH ) {
91- description(" Overwrite the current version. Don't do any merges and don't prevent losing history." )
92- }
9390 permission(DELETE )
9491 permission(WRITE ) {
9592 description(" Non-destructive write operations that preserve the history." )
@@ -100,6 +97,7 @@ object ModelServerPermissionSchema {
10097 }
10198 permission(PUSH ) {
10299 description(" Add changes to a branch and merge it with the current version." )
100+ includes(OBJECTS , ADD )
103101 }
104102 permission(READ ) {
105103 includes(LEGACY_USER_DEFINED_ENTRIES , READ )
@@ -116,6 +114,11 @@ object ModelServerPermissionSchema {
116114 }
117115 }
118116 }
117+
118+ permission(FORCE_PUSH ) {
119+ description(" Overwrite the current version. Don't do any merges and don't prevent losing history." )
120+ includes(PUSH )
121+ }
119122 }
120123 }
121124 }
@@ -168,6 +171,7 @@ object ModelServerPermissionSchema {
168171 val resource: PermissionParts get() = Repository (branchRef.repositoryId).resource + BRANCH + branchRef.branchName
169172 val read: PermissionParts get() = resource + READ
170173 val write: PermissionParts get() = resource + WRITE
174+ val rewrite: PermissionParts get() = resource + REWRITE
171175 val push: PermissionParts get() = resource + PUSH
172176 val pull: PermissionParts get() = resource + PULL
173177 val forcePush: PermissionParts get() = resource + FORCE_PUSH
0 commit comments