diff options
author | ddunne | 2011-08-08 20:19:30 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2011-08-08 20:19:30 +0000 |
commit | f5b92c1a4b7e2b15175187dbc8f98a4dc10c7124 (patch) | |
tree | 2c1535271a4387af5496d47ad93b31107362e1b0 | |
parent | 6240bba49860126a3b5522989ad6a278f9886e02 (diff) | |
download | org.eclipse.osee-f5b92c1a4b7e2b15175187dbc8f98a4dc10c7124.tar.gz org.eclipse.osee-f5b92c1a4b7e2b15175187dbc8f98a4dc10c7124.tar.xz org.eclipse.osee-f5b92c1a4b7e2b15175187dbc8f98a4dc10c7124.zip |
bug[ats_VC0D2]: Access control checks in SkynetTransaction missing check for new user creation
2 files changed, 10 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java index a2c25fc66b6..6970d0378f6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java @@ -274,7 +274,10 @@ public final class UserManager { addUserToUserGroups(user); cacheByUserId(user); - // this is here in case a user is created at an unexpected time + /** + * Since Users are auto-created, display stack trace as INFO in client's log to help debug any unexpected + * creation + */ if (!DbUtil.isDbInit()) { OseeLog.log(Activator.class, Level.INFO, "Created user " + user, new Exception( "just wanted the stack trace")); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java index f14cc37b6dd..e3e290cf4c3 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java @@ -100,6 +100,9 @@ public final class SkynetTransaction extends AbstractOperation { } private void checkAccess(Artifact artifact) throws OseeCoreException { + if (UserManager.duringMainUserCreation()) { + return; + } Branch txBranch = getBranch(); if (!artifact.getBranch().equals(txBranch)) { String msg = @@ -144,6 +147,9 @@ public final class SkynetTransaction extends AbstractOperation { } private void checkAccess(Artifact artifact, RelationLink link) throws OseeCoreException { + if (UserManager.duringMainUserCreation()) { + return; + } checkBranch(link); Branch txBranch = getBranch(); if (!link.getBranch().equals(txBranch)) { |