Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.19.0 - 5 August 2026
* Fix: Handle PrivilegeDepth.RecordFilter like PrivilegeDepth.Global instead of throwing exception

### 1.18.8 - 14 July 2026
* Fix: Align plugin Target with Dataverse for system-managed fields (#344)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ private static PrivilegeDepth PrivilegeDepthToEnum(int privilegeDepth)
2 => PrivilegeDepth.Local,
4 => PrivilegeDepth.Deep,
8 => PrivilegeDepth.Global,
16 => PrivilegeDepth.RecordFilter,
_ => throw new NotImplementedException($"Unknown privilege depth mask: {privilegeDepth}")
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ public async Task GetSecurityRolesAsync_RolesWithPrivilegesHaveValidDepth()
privilege.Value.PrivilegeDepth == PrivilegeDepth.Basic ||
privilege.Value.PrivilegeDepth == PrivilegeDepth.Local ||
privilege.Value.PrivilegeDepth == PrivilegeDepth.Deep ||
privilege.Value.PrivilegeDepth == PrivilegeDepth.Global,
privilege.Value.PrivilegeDepth == PrivilegeDepth.Global ||
privilege.Value.PrivilegeDepth == PrivilegeDepth.RecordFilter,
$"Role '{role.Name}' has invalid privilege depth: {privilege.Value.PrivilegeDepth}");
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/MetadataGen/MetadataGenerator.Tool/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to XrmMockup.MetadataGenerator will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### v1.0.5 - 5 August 2026
* Fix: Handle PrivilegeDepth.RecordFilter like PrivilegeDepth.Global instead of throwing exception

### v1.0.4 - 23 March 2026
* Add: Show version header on start (#321)

Expand Down
1 change: 1 addition & 0 deletions src/MetadataGen/MetadataGenerator365/DataHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ private PrivilegeDepth PrivilegeDepthToEnum(int privilegeDepth)
case 2: return PrivilegeDepth.Local;
case 4: return PrivilegeDepth.Deep;
case 8: return PrivilegeDepth.Global;
case 16: return PrivilegeDepth.RecordFilter;
default:
throw new NotImplementedException($"Unknown privilege depth mask: {privilegeDepth}");
}
Expand Down
3 changes: 3 additions & 0 deletions src/XrmMockup365/Security.cs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ internal bool HasCallerPermission(Entity entity, AccessRights access, EntityRefe
// if max privelege depth is global, then caller can access all entities
if (maxRole == PrivilegeDepth.Global) return true;

// RecordFilter privilege depth is not properly handled, and are instead handled as Global
if (maxRole == PrivilegeDepth.RecordFilter) return true;

// sets owner of entity to caller if there is no owner already
if (access == AccessRights.CreateAccess && !entity.Attributes.ContainsKey("ownerid"))
{
Expand Down
Loading