You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/10/11 08:16:49 UTC

[GitHub] ningyougang commented on a change in pull request #4058: Add protect feature to avoid update or delete actions by mistake

ningyougang commented on a change in pull request #4058: Add protect feature to avoid update or delete actions by mistake
URL: https://github.com/apache/incubator-openwhisk/pull/4058#discussion_r224355058
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/Actions.scala
 ##########
 @@ -307,7 +313,21 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation with
    * - 500 Internal Server Error
    */
   override def remove(user: Identity, entityName: FullyQualifiedEntityName)(implicit transid: TransactionId) = {
-    deleteEntity(WhiskAction, entityStore, entityName.toDocId, (a: WhiskAction) => Future.successful({}))
+    getEntity(WhiskAction.get(entityStore, entityName.toDocId), Some {
+      action: WhiskAction =>
+        action.annotations.get("protection") match {
+          case Some(value) => {
 
 Review comment:
   @cbickel 
   Already modified

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services