mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Subscription checks
This commit is contained in:
parent
6e4c5194e2
commit
e116d3b000
20 changed files with 211 additions and 76 deletions
|
@ -57,7 +57,7 @@ func (h *Handler) Add(w http.ResponseWriter, r *http.Request) {
|
|||
method := "space.add"
|
||||
ctx := domain.GetRequestContext(r)
|
||||
|
||||
if !h.Runtime.Product.License.IsValid() {
|
||||
if !h.Runtime.Product.License.IsValid(ctx.OrgID) {
|
||||
response.WriteBadLicense(w)
|
||||
return
|
||||
}
|
||||
|
@ -582,7 +582,7 @@ func (h *Handler) Remove(w http.ResponseWriter, r *http.Request) {
|
|||
method := "space.remove"
|
||||
ctx := domain.GetRequestContext(r)
|
||||
|
||||
if !h.Runtime.Product.License.IsValid() {
|
||||
if !h.Runtime.Product.License.IsValid(ctx.OrgID) {
|
||||
response.WriteBadLicense(w)
|
||||
return
|
||||
}
|
||||
|
@ -675,7 +675,7 @@ func (h *Handler) Delete(w http.ResponseWriter, r *http.Request) {
|
|||
method := "space.delete"
|
||||
ctx := domain.GetRequestContext(r)
|
||||
|
||||
if !h.Runtime.Product.License.IsValid() {
|
||||
if !h.Runtime.Product.License.IsValid(ctx.OrgID) {
|
||||
response.WriteBadLicense(w)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue