Lock button is not shown in directory on Staging when user goes to directory for the first time

Summary

Lock button is not shown in directory on Staging when user goes to the directory for the first time. If user reloads the page - Lock button appears(see attachment below).

This is causing a QA test to fail: #35153 (closed)

It's not clear how long it's been failing. No such an issue on Production also I don't see this issue in my local GDK.

Steps to reproduce

  1. On Staging, create a project with directory.
  2. Go to the directory page.

Example Project

https://staging.gitlab.com/niskhakova-test-group/source_project

What is the current bug behavior?

Lock button is not shown in directory on Staging when user opens directory for the first time.

What is the expected correct behavior?

Lock button should be visible when user opens directory.

Relevant logs and/or screenshots

Screen_Recording_2019-10-30_at_17.18.23

Output of checks

This bug happens on staging.gitlab.com

Assignee Loading
Time tracking Loading