File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,15 @@ package api
3
3
import (
4
4
"crypto/rand"
5
5
"encoding/base64"
6
+ "io"
7
+ "net/http"
8
+ "strings"
9
+
6
10
"github.com/gorilla/mux"
7
11
"github.com/semaphoreui/semaphore/api/helpers"
8
12
"github.com/semaphoreui/semaphore/db"
9
13
"github.com/semaphoreui/semaphore/pro_interfaces"
10
14
"github.com/semaphoreui/semaphore/util"
11
- "io"
12
- "net/http"
13
- "strings"
14
15
)
15
16
16
17
type UserController struct {
@@ -38,7 +39,9 @@ func (c *UserController) GetUser(w http.ResponseWriter, r *http.Request) {
38
39
user .User = * helpers .GetFromContext (r , "user" ).(* db.User )
39
40
user .CanCreateProject = user .Admin || util .Config .NonAdminCanCreateProject
40
41
user .HasActiveSubscription = c .subscriptionService .HasActiveSubscription ()
41
-
42
+ if ! user .HasActiveSubscription {
43
+ user .Pro = false
44
+ }
42
45
helpers .WriteJSON (w , http .StatusOK , user )
43
46
}
44
47
You can’t perform that action at this time.
0 commit comments