mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
Define request attribute keys.
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package util
|
||||
|
||||
/**
|
||||
* Define key strings for request attributes, session attributes or flash attributes..
|
||||
* Define key strings for request attributes, session attributes or flash attributes.
|
||||
*/
|
||||
object Keys {
|
||||
|
||||
/**
|
||||
* Define session keys.
|
||||
*/
|
||||
object Session {
|
||||
|
||||
/**
|
||||
@@ -44,4 +47,26 @@ object Keys {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Define request keys.
|
||||
*/
|
||||
object Request {
|
||||
|
||||
/**
|
||||
* Request key for the Ajax request flag.
|
||||
*/
|
||||
val Ajax = "AJAX"
|
||||
|
||||
/**
|
||||
* Request key for the username which is used during Git repository access.
|
||||
*/
|
||||
val UserName = "USER_NAME"
|
||||
|
||||
/**
|
||||
* Generate request key for the request cache.
|
||||
*/
|
||||
def Cache(key: String) = s"cache.${key}"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user