Exemple #1
0
 public async Task GrantTargetApp(GatewayUser user, string appId)
 {
     if (!await HasAuthorizedApp(user, appId))
     {
         var appGrant = new AppGrant
         {
             AppID         = appId,
             GatewayUserId = user.Id
         };
         _dbContext.LocalAppGrant.Add(appGrant);
         await _dbContext.SaveChangesAsync();
     }
 }
Exemple #2
0
        internal static int Update(AppGrant info)
        {
            string sql = "update AppGrant set AppId=@AppId,AppServiceId=@AppServiceId,AppFunctionId=@AppFunctionId where AppGrantId=@AppGrantId";

            return(Update <AppGrant>(con, sql, info));
        }
Exemple #3
0
        internal static int Add(AppGrant info)
        {
            string sql = "insert into AppGrant(AppId,AppServiceId,AppFunctionId) values(@AppId,@AppServiceId,@AppFunctionId)";

            return(Insert <AppGrant>(con, sql, info));
        }