66namespace Rhino . Security . Interfaces
77{
88 ///<summary>
9- /// Implementors of this interface are able to answer
10- /// on authorization questions as well as enhance Criteria
11- /// queries
9+ /// Implementors of this interface are able to answer
10+ /// on authorization questions as well as enhance Criteria
11+ /// queries
1212 ///</summary>
1313 public interface IAuthorizationService
1414 {
1515 /// <summary>
16- /// Adds the permissions to the criteria query.
16+ /// Adds the permissions to the linq query.
17+ /// </summary>
18+ /// <param name="user">The user.</param>
19+ /// <param name="operation">The operation.</param>
20+ /// <param name="query">The query.</param>
21+ IQueryable < TEntity > AddPermissionsToQuery < TEntity > ( IUser user , string operation , IQueryable < TEntity > query ) where TEntity : class ;
22+
23+ ///<summary>
24+ /// Adds the permissions to the linq query for the given usersgroup
25+ ///</summary>
26+ ///<param name="usersgroup">The usersgroup. Only permissions directly related to this usergroup
27+ /// are taken into account</param>
28+ ///<param name="operation">The operation</param>
29+ /// <param name="query">The query.</param>
30+ IQueryable < TEntity > AddPermissionsToQuery < TEntity > ( UsersGroup usersgroup , string operation , IQueryable < TEntity > query ) where TEntity : class ;
31+
32+ /// <summary>
33+ /// Adds the permissions to the criteria query.
1734 /// </summary>
18- /// <param name = "user">The user.</param>
35+ /// <param name= "user">The user.</param>
1936 /// <param name = "operation">The operation.</param>
20- /// <param name = "criteria">The criteria.</param>
37+ /// <param name= "criteria">The criteria.</param>
2138 void AddPermissionsToQuery ( IUser user , string operation , ICriteria criteria ) ;
2239
23- ///<summary>
24- /// Adds the permissions to the criteria query for the given usersgroup
25- ///</summary>
26- ///<param name = "usersgroup">The usersgroup. Only permissions directly related to this usergroup
27- /// are taken into account</param>
28- ///<param name = "operation">The operation</param>
29- ///<param name = "criteria">The criteria</param>
30- void AddPermissionsToQuery ( UsersGroup usersgroup , string operation , ICriteria criteria ) ;
40+ ///<summary>
41+ /// Adds the permissions to the criteria query for the given usersgroup
42+ ///</summary>
43+ ///<param name= "usersgroup">The usersgroup. Only permissions directly related to this usergroup
44+ /// are taken into account</param>
45+ ///<param name= "operation">The operation</param>
46+ ///<param name= "criteria">The criteria</param>
47+ void AddPermissionsToQuery ( UsersGroup usersgroup , string operation , ICriteria criteria ) ;
3148
3249 /// <summary>
33- /// Adds the permissions to the criteria query.
50+ /// Adds the permissions to the criteria query.
3451 /// </summary>
35- /// <param name = "user">The user.</param>
36- /// <param name = "criteria">The criteria.</param>
37- /// <param name = "operation">The operation.</param>
52+ /// <param name= "user">The user.</param>
53+ /// <param name= "criteria">The criteria.</param>
54+ /// <param name= "operation">The operation.</param>
3855 void AddPermissionsToQuery ( IUser user , string operation , DetachedCriteria criteria ) ;
3956
40- /// <summary>
41- /// Adds the permissions to the NHibernate Linq IQueryable query.
42- /// </summary>
43- /// <param name="user">The user</param>
44- /// <param name="operation">The operation</param>
45- /// <param name="query">The NHibernate Linq IQueryable</param>
46- /// <typeparam name="T">The type of the IQueryable</typeparam>
47- /// <returns>Queryable with permissions added</returns>
48- IQueryable < T > AddPermissionsToQuery < T > ( IUser user , string operation , IQueryable < T > query ) ;
49-
50- /// <summary>
51- /// Adds the permissions to the NHibernate Linq IQueryable query for the given usergorup
52- /// </summary>
53- /// <param name="usersgroup">The usergroup</param>
54- /// <param name="operation">The operation</param>
55- /// <param name="query">The NHibernate Linq IQueryable</param>
56- /// <typeparam name="T">The type of the IQueryable</typeparam>
57- /// <returns>Queryable with permissions added</returns>
58- IQueryable < T > AddPermissionsToQuery < T > ( UsersGroup usersgroup , string operation , IQueryable < T > query ) ;
59-
60- ///<summary>
57+ ///<summary>
6158 /// Adds the permissions to the criteria query for the given usersgroup
62- ///</summary>
63- ///<param name = "usersgroup">The usersgroup. Only permissions directly related to this usergroup
64- /// are taken into account</param>
65- ///<param name = "operation">The operation</param>
66- ///<param name = "criteria">The criteria</param>
67- void AddPermissionsToQuery ( UsersGroup usersgroup , string operation , DetachedCriteria criteria ) ;
59+ ///</summary>
60+ ///<param name= "usersgroup">The usersgroup. Only permissions directly related to this usergroup
61+ /// are taken into account</param>
62+ ///<param name= "operation">The operation</param>
63+ ///<param name= "criteria">The criteria</param>
64+ void AddPermissionsToQuery ( UsersGroup usersgroup , string operation , DetachedCriteria criteria ) ;
6865
6966 /// <summary>
70- /// Determines whether the specified user is allowed to perform the specified
71- /// operation on the entity
67+ /// Determines whether the specified user is allowed to perform the specified
68+ /// operation on the entity
7269 /// </summary>
73- /// <typeparam name = "TEntity">The type of the entity.</typeparam>
74- /// <param name = "user">The user.</param>
75- /// <param name = "entity">The entity.</param>
76- /// <param name = "operation">The operation.</param>
70+ /// <typeparam name= "TEntity">The type of the entity.</typeparam>
71+ /// <param name= "user">The user.</param>
72+ /// <param name= "entity">The entity.</param>
73+ /// <param name= "operation">The operation.</param>
7774 /// <returns>
7875 /// <c>true</c> if the specified user is allowed; otherwise, <c>false</c>.
7976 /// </returns>
8077 bool IsAllowed < TEntity > ( IUser user , TEntity entity , string operation ) where TEntity : class ;
8178
8279 /// <summary>
83- /// Determines whether the specified user is allowed to perform the
84- /// specified operation on the entity.
80+ /// Determines whether the specified user is allowed to perform the
81+ /// specified operation on the entity.
8582 /// </summary>
86- /// <param name = "user">The user.</param>
87- /// <param name = "operation">The operation.</param>
83+ /// <param name= "user">The user.</param>
84+ /// <param name= "operation">The operation.</param>
8885 /// <returns>
8986 /// <c>true</c> if the specified user is allowed; otherwise, <c>false</c>.
9087 /// </returns>
9188 bool IsAllowed ( IUser user , string operation ) ;
9289
9390 /// <summary>
94- /// Gets the authorization information for the specified user and operation,
95- /// allows to easily understand why a given operation was granted / denied.
91+ /// Gets the authorization information for the specified user and operation,
92+ /// allows to easily understand why a given operation was granted / denied.
9693 /// </summary>
97- /// <param name = "user">The user.</param>
98- /// <param name = "operation">The operation.</param>
94+ /// <param name= "user">The user.</param>
95+ /// <param name= "operation">The operation.</param>
9996 /// <returns></returns>
10097 AuthorizationInformation GetAuthorizationInformation ( IUser user , string operation ) ;
10198
10299 /// <summary>
103- /// Gets the authorization information for the specified user and operation on the
104- /// given entity, allows to easily understand why a given operation was granted / denied.
100+ /// Gets the authorization information for the specified user and operation on the
101+ /// given entity, allows to easily understand why a given operation was granted / denied.
105102 /// </summary>
106- /// <typeparam name = "TEntity">The type of the entity.</typeparam>
107- /// <param name = "user">The user.</param>
108- /// <param name = "entity">The entity.</param>
109- /// <param name = "operation">The operation.</param>
103+ /// <typeparam name= "TEntity">The type of the entity.</typeparam>
104+ /// <param name= "user">The user.</param>
105+ /// <param name= "entity">The entity.</param>
106+ /// <param name= "operation">The operation.</param>
110107 /// <returns></returns>
111108 AuthorizationInformation GetAuthorizationInformation < TEntity > ( IUser user , TEntity entity , string operation )
112109 where TEntity : class ;
113- }
110+ }
114111}
0 commit comments