Skip to content

Commit

Permalink
psp-7170 correct view property contact permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinleighsmith committed Nov 3, 2023
1 parent 44c5f3a commit ff21e6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/backend/api/Services/PropertyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ public PimsProperty Update(PimsProperty property)
public IList<PimsPropertyContact> GetContacts(long propertyId)
{
_logger.LogInformation("Retrieving property contacts...");
_user.ThrowIfNotAuthorized(Permissions.PropertyEdit);
_user.ThrowIfNotAuthorized(Permissions.PropertyView);

Check warning on line 119 in source/backend/api/Services/PropertyService.cs

View check run for this annotation

Codecov / codecov/patch

source/backend/api/Services/PropertyService.cs#L119

Added line #L119 was not covered by tests

return _propertyContactRepository.GetContactsByProperty(propertyId);
}

public PimsPropertyContact GetContact(long propertyId, long contactId)
{
_logger.LogInformation("Retrieving single property contact...");
_user.ThrowIfNotAuthorized(Permissions.PropertyEdit);
_user.ThrowIfNotAuthorized(Permissions.PropertyView);

Check warning on line 127 in source/backend/api/Services/PropertyService.cs

View check run for this annotation

Codecov / codecov/patch

source/backend/api/Services/PropertyService.cs#L127

Added line #L127 was not covered by tests

var propertyContact = _propertyContactRepository.GetContact(contactId);

Expand Down

0 comments on commit ff21e6d

Please sign in to comment.