Utilizes the check for secure upload permissions from core PR https://github.com/discourse/discourse/pull/25758 and cleans up controller codes and spec code to reuse existing code and better reflect reality.
Utilizes the check for secure upload permissions from core PR https://github.com/discourse/discourse/pull/25758 and cleans up controller codes and spec code to reuse existing code and better reflect reality.