backend: new option that unlock all challenges
This commit is contained in:
parent
105160334d
commit
4ff47fc46d
2 changed files with 4 additions and 1 deletions
|
|
@ -6,6 +6,8 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
var UnlockedChallenges bool
|
||||
|
||||
type Team struct {
|
||||
Id int64 `json:"id"`
|
||||
InitialName string `json:"initialName"`
|
||||
|
|
@ -143,7 +145,7 @@ func GetTryRank() ([]int64, error) {
|
|||
}
|
||||
|
||||
func (t Team) HasAccess(e Exercice) bool {
|
||||
if e.Depend == nil {
|
||||
if e.Depend == nil || UnlockedChallenges {
|
||||
return true
|
||||
} else {
|
||||
ed := Exercice{}
|
||||
|
|
|
|||
Reference in a new issue