Skip to content

Commit

Permalink
docs: better xmldoc comment for security attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Oct 18, 2023
1 parent b4f64a0 commit 6536377
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ IDataSourceParameters parameters
/// <summary>
/// Maps the incoming DTO's properties to the item that will be saved to the database.
/// </summary>
/// <param name="kind">Descriminator between a create and a update operation.</param>
/// <param name="kind">Discriminator between a create and a update operation.</param>
/// <param name="item">The item that will be saved to the database.</param>
/// <param name="dto">The incoming item from the client.</param>
/// <param name="parameters">The additional parameters sent by the client.</param>
Expand Down
7 changes: 5 additions & 2 deletions src/IntelliTect.Coalesce/DataAnnotations/CreateAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
namespace IntelliTect.Coalesce.DataAnnotations
{
/// <summary>
/// Should users be allowed to create an entity via the API/button.
/// </summary>
/// <para>
/// When placed on an entity or custom <see cref="IClassDto{T}"/> class exposed by Coalesce,
/// controls the permissions for saving new instances of the model via the /save or /bulkSave endpoints.
/// </para>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public sealed class CreateAttribute : SecurityAttribute
{
Expand Down
7 changes: 5 additions & 2 deletions src/IntelliTect.Coalesce/DataAnnotations/DeleteAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
namespace IntelliTect.Coalesce.DataAnnotations
{
/// <summary>
/// Should users be allowed to delete an entity via the API/button.
/// </summary>
/// <para>
/// When placed on an entity or custom <see cref="IClassDto{T}"/> class exposed by Coalesce,
/// controls the permissions for the deleting existing instances of the model via the /delete or /bulkSave endpoints.
/// </para>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class DeleteAttribute : SecurityAttribute
{
Expand Down
12 changes: 10 additions & 2 deletions src/IntelliTect.Coalesce/DataAnnotations/EditAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
namespace IntelliTect.Coalesce.DataAnnotations
{
/// <summary>
/// The Class or Property is read/write for the users and groups and not accessible to others.
/// <para>
/// When placed on an entity or custom <see cref="IClassDto{T}"/> class exposed by Coalesce,
/// controls the permissions for modifying existing instances of the model via the /save or /bulkSave endpoints.
/// </para>
/// <para>
/// When placed on a property exposed by Coalesce, controls the roles that are allowed
/// to send data from the client to the server for that property for any purpose,
/// including the /save and /bulkSave APIs, and method parameters.
/// </para>
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class)]
public class EditAttribute: SecurityAttribute
public class EditAttribute : SecurityAttribute
{
public EditAttribute()
{
Expand Down
11 changes: 9 additions & 2 deletions src/IntelliTect.Coalesce/DataAnnotations/ReadAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@

namespace IntelliTect.Coalesce.DataAnnotations
{

/// <summary>
/// <para>
/// The Class or Property is read only for the users and groups and not accessible to others.
/// If no roles are specified, the target is readable by anyone.
/// When placed on an entity or custom <see cref="IClassDto{T}"/> class exposed by Coalesce,
/// controls the permissions for fetching existing instances of the model from
/// the /get, /list, and /count endpoints.
/// </para>
/// <para>
/// When placed on a property exposed by Coalesce, controls the roles that are allowed
/// to read data from that property for any usage of the parent model,
/// including when the model is a custom method result or a nested child of another model.
/// </para>
/// <para>If specified on a property with no <see cref="EditAttribute"/>, the property is read-only.</para>
/// </summary>
Expand Down

0 comments on commit 6536377

Please sign in to comment.