Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
26e1634
save initial changes
yarivat Oct 29, 2017
05bb6b7
fix bugs , remove message board and DBS alias from xsd, fix password …
yarivat Nov 5, 2017
7ff998b
more sql fixes and remove "add catagory" to xml
yarivat Nov 13, 2017
982766e
Add files via upload
yarivat Nov 13, 2017
3c1fbbb
adding mysql generate main database
yarivat Nov 13, 2017
8cabce9
Merge branch 'MySqlMainMapsConnection' of https://github.com/backand/…
yarivat Nov 13, 2017
4aef56c
add missing files
yarivat Nov 13, 2017
f5cb1e2
fix configs
yarivat Nov 14, 2017
ae7d226
fix pool issue , clean unneseserly SqlAccess, and fix no Http.Current
yarivat Nov 14, 2017
20c6550
remove unnecesery declaration
yarivat Nov 15, 2017
5ea74fe
set creator i in web.config
yarivat Nov 15, 2017
712f267
merge master with mysqlmain, need to correct SuperDeveloper behavior …
yarivat Nov 15, 2017
a2dfe8b
fic web.config
yarivat Nov 15, 2017
c56fa01
config cloud provider
relly Nov 15, 2017
75a716f
merge
relly Nov 15, 2017
a3f308b
remove NewRelic and fix Security role issue
yarivat Nov 16, 2017
4cc55c8
Merge branch 'MySqlMainMapsConnection' of https://github.com/backand/…
yarivat Nov 16, 2017
bf177f1
fix master and main app guid
yarivat Nov 30, 2017
b501012
fix create procedure privilges
yarivat Nov 30, 2017
b985355
Update webhooks.json
itayher Dec 7, 2017
36083fb
store config in aws
relly Dec 12, 2017
2c34b61
convert old password
relly Dec 12, 2017
9f45f63
convert old password
relly Dec 12, 2017
4eeedc7
merge
relly Dec 12, 2017
ea3ac82
membership validation conversion
relly Dec 13, 2017
ed9dca6
membership validation conversion
relly Dec 13, 2017
06e81ae
start fix billing and reports sqls and reset keys
yarivat Dec 19, 2017
2606611
Merge branch 'MySqlMainMapsConnection' of https://github.com/backand/…
yarivat Dec 19, 2017
07a1072
fix MSO
yarivat Dec 28, 2017
5a37f9f
debug
yarivat Dec 30, 2017
f257e08
fix Invite user/admin
yarivat Dec 31, 2017
e5eb4b6
fix pool connection string and backand.xml backup
yarivat Jan 1, 2018
de2477f
fix password query
yarivat Jan 3, 2018
c600aa1
raise max invalid password attempts and reset failed attempt count
yarivat Jan 4, 2018
ddcae47
fix pool app select to ignore deleted apps
yarivat Jan 7, 2018
a4c2cb8
keep local address in the server
yarivat Jan 14, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BackAnd.UnitTests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" publicKeyToken="31bf3856ad364e35" culture="neutral" />
Expand Down
5 changes: 5 additions & 0 deletions BackAnd.UnitTests/BackAnd.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.1.2\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.XML" />
</ItemGroup>
<Choose>
Expand Down Expand Up @@ -112,6 +116,7 @@
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Config\backand.xml">
Expand Down
4 changes: 4 additions & 0 deletions BackAnd.Web.Api.Test/BackAnd.Web.Api.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="WebSocket4Net">
<HintPath>..\packages\WebSocket4Net.0.13.1\lib\net45\WebSocket4Net.dll</HintPath>
</Reference>
Expand Down
2 changes: 2 additions & 0 deletions BackAnd.Web.Api.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AspNetRazor.Core" version="2.0.20710.0" targetFramework="net45" />
<package id="EngineIoClientDotNet" version="0.9.21" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="RestSharp" version="104.4.0" targetFramework="net45" />
<package id="SocketIoClientDotNet" version="0.9.12" targetFramework="net45" />
Expand Down
12 changes: 4 additions & 8 deletions BackAnd.Web.Api/BackAnd.Web.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,14 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Npgsql.2.2.5\lib\net45\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=6.4.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<Reference Include="MySql.Data, Version=6.3.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Duradus.Web.Mvc.App\deployment\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="MySql.Web, Version=6.4.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Duradus.Web.Mvc.App\deployment\MySql.Web.dll</HintPath>
</Reference>
<Reference Include="NewRelic.Api.Agent, Version=6.3.123.0, Culture=neutral, PublicKeyToken=06552fced0b33d87, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NewRelic.Agent.Api.6.3.123.0\lib\NewRelic.Api.Agent.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand Down Expand Up @@ -177,7 +173,6 @@
<ItemGroup>
<Content Include="Config\backand.xml" />
<Content Include="Config\backand.xml.xml" />
<Content Include="deployment\helloWorld.js" />
<Content Include="deployment\jsInfrastructure.js" />
<Content Include="deployment\accessFilter.js" />
<Content Include="deployment\socialAuthOverride.js" />
Expand Down Expand Up @@ -210,6 +205,7 @@
<Content Include="deployment\Sql\logTable-MySql.sql" />
<Content Include="deployment\Sql\logTable.sql" />
<Content Include="deployment\Sql\MailingService.sql" />
<Content Include="deployment\Sql\MainMapGenerate.sql" />
<Content Include="deployment\Sql\MessageBoard.sql" />
<Content Include="deployment\Sql\Northwind.sql" />
<Content Include="deployment\Sql\NorthwindAdditional.sql" />
Expand Down Expand Up @@ -240,6 +236,7 @@
<Compile Include="ChallengeResult.cs" />
<Compile Include="Controllers\accountController.cs" />
<Compile Include="Controllers\Admin\actionTemplateController.cs" />
<Compile Include="Controllers\Admin\pmigController.cs" />
<Compile Include="Controllers\Admin\lambdaController.cs" />
<Compile Include="Controllers\Admin\cronController.cs" />
<Compile Include="Controllers\Admin\limitsController.cs">
Expand Down Expand Up @@ -288,7 +285,6 @@
<Compile Include="Controllers\uploadConfigController.cs" />
<Compile Include="Controllers\queryDataController.cs" />
<Compile Include="Controllers\ruleController.cs" />
<Compile Include="Controllers\themeController.cs" />
<Compile Include="Controllers\systemController.cs" />
<Compile Include="Controllers\fileController.cs" />
<Compile Include="Controllers\businessRuleController.cs" />
Expand Down Expand Up @@ -385,7 +381,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>5943</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:4110</IISUrl>
<IISUrl>http://localhost:8080</IISUrl>
<OverrideIISAppRootUrl>True</OverrideIISAppRootUrl>
<IISAppRootUrl>http://localhost:5943</IISAppRootUrl>
<NTLMAuthentication>False</NTLMAuthentication>
Expand Down
19 changes: 10 additions & 9 deletions BackAnd.Web.Api/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private string GetUserDetail(string guid, string userField)
private string GetUserFieldsForSelect()
{
string select;
select = string.Format("[{0}],[{1}],[{2}],[{3}],[{4}]", Map.Database.UserGuidFieldName, Map.Database.UsernameFieldName, "FirstName", "LastName", "Email");
select = string.Format(Durados.Web.Mvc.Maps.MainAppSchema.GetUserFieldsForSelectSql(), Map.Database.UserGuidFieldName, Map.Database.UsernameFieldName, "FirstName", "LastName", "Email");

return select;
}
Expand All @@ -148,13 +148,13 @@ protected string PWResetNotAllowedMessage
}
private void LoadUserData(string guid)
{
Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess();
Durados.DataAccess.SqlAccess sqlAccess = Durados.Web.Mvc.Maps.MainAppSqlAccess;

Dictionary<string, object> parameters = new Dictionary<string, object>();

parameters.Add("@guid", guid);

string sqlDuradosSys = string.Format("SELECT TOP 1 username FROM durados_user WITH(NOLOCK) WHERE guid=@guid");
string sqlDuradosSys = Durados.Web.Mvc.Maps.MainAppSchema.GetLoadUserDataByGuidSql();

object duradosSysUser = sqlAccess.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.ConnectionString, sqlDuradosSys, parameters);

Expand All @@ -165,7 +165,7 @@ private void LoadUserData(string guid)

parameters.Add("@username", duradosSysUser.ToString());

string sql = string.Format("SELECT TOP 1 {0} FROM {1} WITH(NOLOCK) WHERE {2}=@username", GetUserFieldsForSelect(), Map.Database.UserViewName, Map.Database.UsernameFieldName);
string sql = Durados.Web.Mvc.Maps.MainAppSchema.GetLoadUserDataByUsernameSql( GetUserFieldsForSelect(), Map.Database.UserViewName, Map.Database.UsernameFieldName);

object dataTable = sqlAccess.ExecuteTable(Map.Database.GetUserView().ConnectionString, sql, parameters, System.Data.CommandType.Text);

Expand Down Expand Up @@ -308,13 +308,14 @@ private string GetUserGuid(string userName)
{
try
{
Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess();
Durados.DataAccess.SqlAccess sql = Durados.Web.Mvc.Maps.MainAppSqlAccess;

Dictionary<string, object> parameters = new Dictionary<string, object>();

parameters.Add("@username", userName);
string userViewName = Map.Database.UserViewName;
object guid = sql.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [durados_user].[guid] FROM durados_user WITH(NOLOCK) WHERE [durados_user].[username]=@username", parameters);

object guid = sql.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, Durados.Web.Mvc.Maps.MainAppSchema.GetUserGuidSql(), parameters);

if (guid == null || guid == DBNull.Value)
throw new Durados.DuradosException(Map.Database.Localizer.Translate("Username has no uniqe guid ,password canot be reset."));
Expand Down Expand Up @@ -545,12 +546,12 @@ private void ApproveUser(string appName, string username)
Dictionary<string, object> parameters2 = new Dictionary<string, object>();
parameters2.Add("@UserId", userId);
parameters2.Add("@AppId", mapId);
Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess();
if (string.IsNullOrEmpty(sql.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [ID] FROM [durados_UserApp] WHERE [UserId]=@UserId AND [AppId]=@AppId", parameters2)))
Durados.DataAccess.SqlAccess sqlAccess = Durados.Web.Mvc.Maps.MainAppSqlAccess;
if (string.IsNullOrEmpty(sqlAccess.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, Durados.Web.Mvc.Maps.MainAppSchema.GetUserAappIdSql(), parameters2)))
{
parameters2.Add("@newUser", username);
parameters2.Add("@appName", appName);
sql.ExecuteNonQuery(Durados.Web.Mvc.Maps.Instance.DuradosMap.Database.ConnectionString, "durados_AssignPendingApps @newUser,@appName", parameters2, AssignPendingAppsCallback);
sqlAccess.ExecuteNonQuery(Durados.Web.Mvc.Maps.Instance.DuradosMap.Database.ConnectionString, "durados_AssignPendingApps @newUser,@appName", parameters2, AssignPendingAppsCallback);
}
}

Expand Down
13 changes: 3 additions & 10 deletions BackAnd.Web.Api/Controllers/Admin/limitsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,9 @@ public IHttpActionResult Put(string appName = null)

int limit = System.Convert.ToInt32(values[key]);

SqlAccess sa = new SqlAccess();

string sql = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; " +
"BEGIN TRANSACTION; " +
"UPDATE dbo.durados_AppLimits SET Limit = " + limit + " WHERE AppId = " + id + " and Name = '" + limits.ToString() + "';" +
" IF @@ROWCOUNT = 0 " +
"BEGIN " +
"INSERT into dbo.durados_AppLimits (Name, Limit, AppId) values ('" + limits.ToString() + "'," + limit + "," + id.Value + "); " +
"END " +
"COMMIT TRANSACTION;";
SqlAccess sa = Maps.MainAppSqlAccess;

string sql = Maps.MainAppSchema.GetInsertLimitsSql(limits, limit, id);

sa.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql);
}
Expand Down
Loading