Documentation
¶
Index ¶
- Constants
- Variables
- func CORSReport(c *gin.Context)
- func GetOrganizationId(c *gin.Context) int
- func GetProjectId(c *gin.Context) (uuid.UUID, error)
- func GetTx(c *gin.Context) *sql.Tx
- func GetUserEmail(c *gin.Context) string
- func GetUserId(c *gin.Context) int
- func GetUserOrgRole(c *gin.Context) string
- func InitRequireAdminAccess()
- func InitRequireProjectAccess()
- func InitRequireWriteAccess()
- func InitUseAppAuth()
- func InitUseClientAuth()
- func InitUseSourceMapAuth()
- func Transactional(c *gin.Context)
- func UseGzip(c *gin.Context)
Constants ¶
View Source
const OrganizationIdContextKey = "organizationId"
View Source
const ProjectContextKey = "project"
View Source
const ProjectIdContextKey = "project_id"
View Source
const TransactionContextKey = "dbTx"
View Source
const UserEmailContextKey = "userEmail"
View Source
const UserIdContextKey = "userId"
View Source
const UserOrgRoleContextKey = "userOrgRole"
Variables ¶
View Source
var ErrProjectIdNotInContext = errors.New("projectId not found in context - ensure RequireProjectAccess middleware is applied")
View Source
var RequireAdminAccess gin.HandlerFunc
View Source
var RequireProjectAccess gin.HandlerFunc
RequireProjectAccess middleware validates that the authenticated user has access to the requested project. A user can access a project if they are a member of the project's organization. This middleware should be applied AFTER UseAppAuth.
View Source
var RequireWriteAccess gin.HandlerFunc
RequireWriteAccess middleware checks if the user has write access to the project's organization. It blocks access for users with 'readonly' role. This middleware should be applied AFTER UseAppAuth.
View Source
var UseAppAuth func(c *gin.Context)
View Source
var UseClientAuth func(c *gin.Context)
View Source
var UseSourceMapAuth func(c *gin.Context)
Functions ¶
func CORSReport ¶
func GetOrganizationId ¶
func GetProjectId ¶
GetProjectId retrieves the project ID from the Gin context
func GetUserEmail ¶
func GetUserOrgRole ¶
func InitRequireAdminAccess ¶
func InitRequireAdminAccess()
func InitRequireProjectAccess ¶
func InitRequireProjectAccess()
func InitRequireWriteAccess ¶
func InitRequireWriteAccess()
func InitUseAppAuth ¶
func InitUseAppAuth()
func InitUseClientAuth ¶
func InitUseClientAuth()
func InitUseSourceMapAuth ¶
func InitUseSourceMapAuth()
func Transactional ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.