mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
fixes flow, and before_action in permissions_controller
This commit is contained in:
parent
b106545d31
commit
e0e3ef9359
3 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
module ClientApi
|
||||
class PermissionsController < ApplicationController
|
||||
before_action :generate_permissions_object, only: :state
|
||||
before_action :generate_permissions_object, only: :status
|
||||
|
||||
def status
|
||||
respond_to do |format|
|
||||
|
|
|
@ -14,7 +14,7 @@ import { getSciNoteInfo } from "../../../services/api/configurations_api";
|
|||
import AboutScinoteModal from "./AboutScinoteModal";
|
||||
|
||||
type State = {
|
||||
modalOpen: boolean,
|
||||
showModal: boolean,
|
||||
scinoteVersion: string,
|
||||
addons: Array<string>
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ type State = {
|
|||
};
|
||||
|
||||
type PermissionsObject = {
|
||||
[string]: boolean
|
||||
[string]: boolean | null
|
||||
}
|
||||
/*
|
||||
This function accepts 3 arguments which are REQUIRED
|
||||
|
@ -42,7 +42,7 @@ export function connect<Props: {}>(
|
|||
parsedPermissions[el] = null;
|
||||
});
|
||||
|
||||
return class extends React.Component<*, State, *> {
|
||||
return class extends React.Component<*, State> {
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
this.state = { permissions: parsedPermissions };
|
||||
|
|
Loading…
Reference in a new issue