Ver a proveniência

Merge pull request #3755 from swagger-api/bug/auth-display-regression

Fix auth icon display regression
bubble
kyle há 7 anos
committed by GitHub
ascendente
cometimento
7de652de0b
2 ficheiros alterados com 5 adições e 5 eliminações
  1. +3
    -3
      src/core/plugins/auth/selectors.js
  2. +2
    -2
      src/core/plugins/oas3/auth-extensions/wrap-selectors.js

+ 3
- 3
src/core/plugins/auth/selectors.js Ver ficheiro

@@ -10,7 +10,7 @@ export const shownDefinitions = createSelector(

export const definitionsToAuthorize = createSelector(
state,
() =>( { specSelectors } ) => {
() => ( { specSelectors } ) => {
let definitions = specSelectors.securityDefinitions()
let list = List()

@@ -27,7 +27,7 @@ export const definitionsToAuthorize = createSelector(
)


export const getDefinitionsByNames = ( state, securities ) =>( { specSelectors } ) => {
export const getDefinitionsByNames = ( state, securities ) => ( { specSelectors } ) => {
let securityDefinitions = specSelectors.securityDefinitions()
let result = List()

@@ -64,7 +64,7 @@ export const authorized = createSelector(
)


export const isAuthorized = ( state, securities ) =>( { authSelectors } ) => {
export const isAuthorized = ( state, securities ) => ( { authSelectors } ) => {
let authorized = authSelectors.authorized()

if(!List.isList(securities)) {


+ 2
- 2
src/core/plugins/oas3/auth-extensions/wrap-selectors.js Ver ficheiro

@@ -6,7 +6,7 @@ import { isOAS3 as isOAS3Helper } from "../helpers"
// Helpers

function onlyOAS3(selector) {
return (ori, system) => (...args) => {
return (ori, system) => (state, ...args) => {
const spec = system.getSystem().specSelectors.specJson()
if(isOAS3Helper(spec)) {
return selector(...args)
@@ -20,7 +20,7 @@ const nullSelector = createSelector(() => null)

const OAS3NullSelector = onlyOAS3(nullSelector)

// Hasta la vista, authentication!
// Hasta la vista, authorization!
export const shownDefinitions = OAS3NullSelector
export const definitionsToAuthorize = OAS3NullSelector
export const getDefinitionsByNames = OAS3NullSelector


Carregando…
Cancelar
Guardar