mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 22:45:51 +01:00
(refs #464)Add a new parameter to specify request method for plugin actions
This commit is contained in:
@@ -36,12 +36,12 @@ class ScalaPlugin(val id: String, val version: String,
|
||||
globalMenuList += GlobalMenu(label, url, icon, condition)
|
||||
}
|
||||
|
||||
def addGlobalAction(path: String, security: Security = All())(function: (HttpServletRequest, HttpServletResponse) => Any): Unit = {
|
||||
globalActionList += Action(path, security, function)
|
||||
def addGlobalAction(method: String, path: String, security: Security = All())(function: (HttpServletRequest, HttpServletResponse, Context) => Any): Unit = {
|
||||
globalActionList += Action(method, path, security, function)
|
||||
}
|
||||
|
||||
def addRepositoryAction(path: String, security: Security = All())(function: (HttpServletRequest, HttpServletResponse, RepositoryInfo) => Any): Unit = {
|
||||
repositoryActionList += RepositoryAction(path, security, function)
|
||||
def addRepositoryAction(method: String, path: String, security: Security = All())(function: (HttpServletRequest, HttpServletResponse, Context, RepositoryInfo) => Any): Unit = {
|
||||
repositoryActionList += RepositoryAction(method, path, security, function)
|
||||
}
|
||||
|
||||
def addJavaScript(filter: String => Boolean, script: String): Unit = {
|
||||
|
||||
Reference in New Issue
Block a user