------------------------------------------------------------------------------------------------- HELPER FUNCTIONS -------------------------------------------------------------------------------------------------
(ctx context.Context)
| 2159 | // HELPER FUNCTIONS |
| 2160 | // ------------------------------------------------------------------------------------------------- |
| 2161 | func isMutationAllowed(ctx context.Context) bool { |
| 2162 | if worker.Config.MutationsMode != worker.DisallowMutations { |
| 2163 | return true |
| 2164 | } |
| 2165 | shareAllowed, ok := ctx.Value("_share_").(bool) |
| 2166 | if !ok || !shareAllowed { |
| 2167 | return false |
| 2168 | } |
| 2169 | return true |
| 2170 | } |
| 2171 | |
| 2172 | var errNoAuth = errors.Errorf("No Auth Token found. Token needed for Admin operations.") |
| 2173 |
no test coverage detected