Changeset 1384


Ignore:
Timestamp:
03/20/09 20:27:15 (11 years ago)
Author:
svonolfe
Message:

Updated interfaces (#532)

Location:
trunk/sources
Files:
3 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/Permission.cs

    r1378 r1384  
    2424using System.Text;
    2525using System.Runtime.Serialization;
    26 using HeuristicLab.DataAccess;
    2726
    2827namespace HeuristicLab.Security.Contracts.BusinessObjects {
     
    3130  public class Permission: PersistableObject {
    3231    [DataMember]
    33     public String Name { get; set; }
     32    public String Description { get; set; }
     33
     34    [DataMember]
     35    public Guid EntityId { get; set; }
    3436  }
    3537}
  • trunk/sources/HeuristicLab.Security.Contracts/BusinessObjects/PermissionOwner.cs

    r1378 r1384  
    2424using System.Text;
    2525using System.Runtime.Serialization;
    26 using HeuristicLab.DataAccess;
    2726
    2827namespace HeuristicLab.Security.Contracts.BusinessObjects {
     
    3231    [DataMember]
    3332    public string Name { get; set; }
     33
     34    [DataMember]
     35    public Guid EntityId { get; set; }
    3436  }
    3537}
  • trunk/sources/HeuristicLab.Security.Contracts/HeuristicLab.Security.Contracts.csproj

    r1378 r1384  
    4242  -->
    4343  <ItemGroup>
    44     <Compile Include="BusinessObjects\GrantedPermissions.cs" />
     44    <Compile Include="BusinessObjects\GrantedPermission.cs" />
    4545    <Compile Include="BusinessObjects\Permission.cs" />
    4646    <Compile Include="BusinessObjects\PermissionOwner.cs" />
    4747    <Compile Include="BusinessObjects\User.cs" />
    4848    <Compile Include="BusinessObjects\UserGroup.cs" />
     49    <Compile Include="BusinessObjects\PersistableObject.cs" />
    4950    <Compile Include="SecurityContractsPlugin.cs" />
    5051    <Compile Include="Interfaces\IPermissionManager.cs" />
  • trunk/sources/HeuristicLab.Security.Contracts/Interfaces/IPermissionManager.cs

    r1378 r1384  
    66  interface IPermissionManager {
    77    Guid Authenticate(String userName, String password);
    8     bool CheckPermission(Guid sessionId, Guid permissionToken,
     8    bool CheckPermission(Guid sessionId, Guid permissionId,
    99      Guid enitityId);
    1010    void EndSession(Guid sessionId);
  • trunk/sources/HeuristicLab.Security.Contracts/Interfaces/ISecurityManager.cs

    r1378 r1384  
    77  interface ISecurityManager {
    88    User AddNewUser(User user);
    9     bool RemoveUser(long userId);
     9    bool RemoveUser(Guid userId);
    1010    User UpdateUser(User user);
    1111
    1212    UserGroup AddNewUserGroup(UserGroup group);
    13     bool RemoveUserGroup(long groupId);
     13    bool RemoveUserGroup(Guid groupId);
    1414    UserGroup UpdateUserGroup(UserGroup group);
    15  
    16     bool AddPermissionOwnerToGroup(long groupId, long permissionOwnerId);
    17     bool RemovePermissionOwnerFromGroup(long groupId, long permissionOwnerId);
    1815
    19     bool GrantPermission(long permissionOwnerId, Guid permissionToken);
    20     bool RevokePermission(long permissionOwnerId, Guid permissionToken);
     16    bool AddPermissionOwnerToGroup(Guid groupId, Guid permissionOwnerId);
     17    bool RemovePermissionOwnerFromGroup(Guid groupId, Guid permissionOwnerId);
     18
     19    bool GrantPermission(Guid permissionOwnerId, Guid permissionId);
     20    bool RevokePermission(Guid permissionOwnerId, Guid permissionId);
    2121  }
    2222}
  • trunk/sources/HeuristicLab.Security.DataAccess/HeuristicLab.Security.DataAccess.csproj

    r1378 r1384  
    5656  </ItemGroup>
    5757  <ItemGroup>
     58    <Compile Include="IDataAdapter.cs" />
    5859    <Compile Include="IPermissionAdapter.cs" />
    5960    <Compile Include="IPermissionOwnerAdapter.cs" />
  • trunk/sources/HeuristicLab.Security.DataAccess/IPermissionAdapter.cs

    r1378 r1384  
    2323using System.Collections.Generic;
    2424using System.Text;
    25 using HeuristicLab.DataAccess;
    2625using HeuristicLab.Security.Contracts.BusinessObjects;
    27 using HeuristicLab.DataAccess.Interfaces;
    2826
    29 namespace HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess {
     27namespace HeuristicLab.Security.DataAccess {
    3028  /// <summary>
    3129  /// The permission database adapter
    3230  /// </summary>
    3331  interface IPermissionAdapter: IDataAdapter<Permission> {
    34     bool hasPermssion(String permissionOwnerId, Guid permissionToken,
     32    /// <summary>
     33    /// Determines, if the permission Owner has the permission on the entity
     34    /// </summary>
     35    /// <param name="permissionOwnerId"></param>
     36    /// <param name="permissionId"></param>
     37    /// <param name="entityId"></param>
     38    /// <returns></returns>
     39    GrantedPermission getPermssion(Guid permissionOwnerId, Guid permissionId,
     40      Guid entityId);
     41
     42    /// <summary>
     43    /// Adds a permission
     44    /// </summary>
     45    /// <param name="permissionOwnerId"></param>
     46    /// <param name="permissionId"></param>
     47    /// <param name="entityId"></param>
     48    /// <returns></returns>
     49    bool addPermission(Guid permissionOwnerId, Guid permissionId,
     50      Guid entityId);
     51
     52    /// <summary>
     53    /// Removes a permission
     54    /// </summary>
     55    /// <param name="permissionOwnerId"></param>
     56    /// <param name="permissionId"></param>
     57    /// <param name="entityId"></param>
     58    /// <returns></returns>
     59    bool removePermission(Guid permissionOwnerId, Guid permissionId,
    3560      Guid entityId);
    3661  }
  • trunk/sources/HeuristicLab.Security.DataAccess/IPermissionOwnerAdapter.cs

    r1378 r1384  
    2323using System.Collections.Generic;
    2424using System.Text;
    25 using HeuristicLab.DataAccess;
    2625using HeuristicLab.Security.Contracts.BusinessObjects;
    27 using HeuristicLab.DataAccess.Interfaces;
    2826
    2927namespace HeuristicLab.Security.DataAccess {
     
    3230  /// </summary>
    3331  public interface IPermissionOwnerAdapter: IDataAdapter<PermissionOwner> {
    34     /// <summary>
    35     /// Gets the permission owner and updates the values of the object
    36     /// </summary>
    37     /// <param name="resource"></param>
    38     /// <returns></returns>
    39     bool GetById(PermissionOwner permOwner);
    40 
    4132    /// <summary>
    4233    /// Get the permission owner with the specified name
  • trunk/sources/HeuristicLab.Security.DataAccess/IUserAdapter.cs

    r1378 r1384  
    2424using System.Text;
    2525using HeuristicLab.Security.Contracts.BusinessObjects;
    26 using HeuristicLab.DataAccess.Interfaces;
    2726
    2827namespace HeuristicLab.Security.DataAccess {
  • trunk/sources/HeuristicLab.Security.DataAccess/IUserGroupAdapter.cs

    r1378 r1384  
    2424using System.Text;
    2525using HeuristicLab.Security.Contracts.BusinessObjects;
    26 using HeuristicLab.DataAccess.Interfaces;
    2726
    2827namespace HeuristicLab.Security.DataAccess {
Note: See TracChangeset for help on using the changeset viewer.