diff --git a/plugin-function/build.xml b/plugin-function/build.xml
index 59ae0c1..e807443 100644
--- a/plugin-function/build.xml
+++ b/plugin-function/build.xml
@@ -5,7 +5,7 @@
-
+
@@ -68,6 +68,10 @@
+
+
+
+
diff --git a/plugin-function/src/main/java/com/fr/plugin/MyAbs.java b/plugin-function/src/main/java/com/fr/plugin/MyAbs.java
index 0e09770..c5ed012 100644
--- a/plugin-function/src/main/java/com/fr/plugin/MyAbs.java
+++ b/plugin-function/src/main/java/com/fr/plugin/MyAbs.java
@@ -4,16 +4,22 @@ import com.fr.general.FArray;
import com.fr.general.GeneralUtils;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
+import com.fr.plugin.context.PluginContexts;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.script.AbstractFunction;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Primitive;
+import com.fr.stable.fun.Authorize;
@EnableMetrics
+@Authorize(callSignKey = MyFunctionConstants.PLUGIN_ID)
public class MyAbs extends AbstractFunction {
@Focus(id = "com.fr.plugin.function.test", text = "Plugin-Test_Function_Abs", source = Original.PLUGIN)
public Object run(Object[] args) {
+ if (!PluginContexts.currentContext().isAvailable()) {
+ return "Error:authorization is expired.";
+ }
int len = ArrayUtils.getLength(args);
if (len == 0) {
return Primitive.ERROR_VALUE;
diff --git a/plugin-function/src/main/java/com/fr/plugin/MyFunctionConstants.java b/plugin-function/src/main/java/com/fr/plugin/MyFunctionConstants.java
new file mode 100644
index 0000000..2d7d4a6
--- /dev/null
+++ b/plugin-function/src/main/java/com/fr/plugin/MyFunctionConstants.java
@@ -0,0 +1,6 @@
+package com.fr.plugin;
+
+public class MyFunctionConstants {
+
+ public static final String PLUGIN_ID = "com.fr.plugin.function.test";
+}