fixed migration
This commit is contained in:
parent
84afb50b66
commit
ba23f9bb7b
@ -23,6 +23,8 @@
|
||||
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using AuthConstants = ASC.Common.Security.Authorizing.AuthConstants;
|
||||
|
||||
namespace ASC.Migration.PersonalToDocspace.Creator;
|
||||
|
||||
@ -192,7 +194,7 @@ public class MigrationCreator
|
||||
using var userDbContextToregion = _creatorDbContext.CreateDbContext<UserDbContext>(_toRegion);
|
||||
var usersCount = userDbContextToregion.Users
|
||||
.Join(userDbContextToregion.UserGroups, u => u.Id, ug => ug.Userid, (u, ug) => new { u, ug })
|
||||
.Where(q => q.u.TenantId == tenant.Id && q.ug.UserGroupId == Common.Security.Authorizing.Constants.DocSpaceAdmin.ID).Count();
|
||||
.Where(q => q.u.TenantId == tenant.Id && q.ug.UserGroupId == AuthConstants.DocSpaceAdmin.ID).Count();
|
||||
if (usersCount > qouta.CountRoomAdmin)
|
||||
{
|
||||
throw new ArgumentException("user count exceed");
|
||||
|
@ -24,7 +24,7 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
using ASC.Core;
|
||||
using AuthConstants = ASC.Common.Security.Authorizing.AuthConstants;
|
||||
|
||||
namespace ASC.Migration.PersonalToDocspace.Runner;
|
||||
|
||||
@ -192,7 +192,7 @@ public class MigrationRunner
|
||||
LastModified = DateTime.UtcNow,
|
||||
RefType = ASC.Core.UserGroupRefType.Contains,
|
||||
Removed = false,
|
||||
UserGroupId = ASC.Common.Security.Authorizing.Constants.DocSpaceAdmin.ID,
|
||||
UserGroupId = AuthConstants.DocSpaceAdmin.ID,
|
||||
Userid = tenant.OwnerId.Value
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user