Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Battalion Commanders access to new profile page #74

Open
Gryph667 opened this issue Jun 25, 2022 · 2 comments
Open

Battalion Commanders access to new profile page #74

Gryph667 opened this issue Jun 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@Gryph667
Copy link
Contributor

Describe the bug
Battalion Commanders do not have access to https://squire.aprilknights.org/profile/new

To Reproduce
Steps to reproduce the behavior:

  1. Have Commander security profile
  2. Navigate to URL
  3. 401 | Unauthorized

Expected behavior
Need to add Commander rank to permissions

@Gryph667 Gryph667 added bug Something isn't working enhancement New feature or request labels Jun 25, 2022
@Gryph667
Copy link
Contributor Author

Found where we defined this.

abort_if(!Auth::user()->checkSecurity('cmuser'), 401, 'Not authorized to create knight.');

We will need to add code that will allow a commander to create new users just in their Battalion. In the short term, we can grant select users 'cmuser' permission node.

@Gryph667
Copy link
Contributor Author

Commented out

{{-- @if (in_array('security', $editable_fields))
<div class="col-sm">
<div class="form-group">
<label>Security</label>
<select class="form-control" name="security">
@foreach ($all_secs as $sec)
<option value="{{ $sec->pkey }}" label="{{ $sec->secname }}"
@if ($sec->pkey == $knight->security) selected @endif>
{{ $sec->secname }}
</option>
@endforeach
</select>
</div>
</div>
@endif --}}
so that Security Profile is obscured in the edit screen. This will enable FS and above to add new users, without letting anyone and everyone grant themselves Admin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants