Commit be8cfed5 by Jason Song Committed by GitHub

Merge pull request #321 from lepdou/bugfix_0711

Bugfix update item cant lock namespace
parents 9f07d812 0138823f
......@@ -42,18 +42,28 @@ public class NamespaceLockAspect {
private ApolloSwitcher apolloSwitcher;
//create item
@Before("@annotation(PreAcquireNamespaceLock) && args(appId, clusterName, namespaceName, item, ..)")
public void requireLockAdvice(String appId, String clusterName, String namespaceName,
ItemDTO item) {
acquireLock(appId, clusterName, namespaceName, item.getDataChangeLastModifiedBy());
}
//update item
@Before("@annotation(PreAcquireNamespaceLock) && args(appId, clusterName, namespaceName, itemId, item, ..)")
public void requireLockAdvice(String appId, String clusterName, String namespaceName, long itemId,
ItemDTO item) {
acquireLock(appId, clusterName, namespaceName, item.getDataChangeLastModifiedBy());
}
//update by change set
@Before("@annotation(PreAcquireNamespaceLock) && args(appId, clusterName, namespaceName, changeSet, ..)")
public void requireLockAdvice(String appId, String clusterName, String namespaceName,
ItemChangeSets changeSet) {
acquireLock(appId, clusterName, namespaceName, changeSet.getDataChangeLastModifiedBy());
}
//delete item
@Before("@annotation(PreAcquireNamespaceLock) && args(itemId, operator, ..)")
public void requireLockAdvice(long itemId, String operator) {
Item item = itemService.findOne(itemId);
......
......@@ -276,8 +276,8 @@ application_module.controller("ConfigNamespaceController",
}
function lockCheck(namespace) {
if (namespace.lockOwner && scope.currentUser != namespace.lockOwner) {
scope.lockOwner = namespace.lockOwner;
if (namespace.lockOwner && $scope.currentUser != namespace.lockOwner) {
$scope.lockOwner = namespace.lockOwner;
$('#namespaceLockedDialog').modal('show');
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment