Skip to content

Admin changes rebased#411

Draft
MoralCode wants to merge 12 commits into
mainfrom
admin-changes-rebased
Draft

Admin changes rebased#411
MoralCode wants to merge 12 commits into
mainfrom
admin-changes-rebased

Conversation

@MoralCode

@MoralCode MoralCode commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Description
This is a branch containing some work that was done on an admin page. This work began before my time, was at some point merged, and then (presumably by accident due to the lack of one-way code flow back then) was somehow un-merged.

This has been rebased to the current version and needs extensive testing to ensure that it works

Notes for Reviewers
needs EXTENSIVE testing. draft because i have no clue when ill get to this

Signed commits

  • Yes, I signed my commits. (also commits by John are signed already too)

Generative AI disclosure

Please select one option:

  • This contribution was NOT assisted or created by Generative AI tools.
  • This contribution was assisted or created by Generative AI tools.

If AI tools were used, please provide details below:
No AI tools used for development to my knowledge. these changes are largely from 2024 or before so i doubt genAI was that good at coding back then

Ulincsys and others added 11 commits June 24, 2026 18:59
Add @requires_admin decorator
Add clarity to backend start error status

Signed-off-by: Ulincsys <ulincsys@gmail.com>
- Add ssl decorator to config endpoints
- Fix syntax error in admin_required decorator
- Update dashboard endpoint to use config class directly
- Update dashboard styles with more consistent colors
- Implement config update functionality in admin dashboard

Signed-off-by: Ulincsys <28362836a@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
Signed-off-by: Ulincsys <ulincsys@gmail.com>
This reverts commit 01f93ef.

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Comment thread collectoss/api/util.py
import beaker

from flask import request, jsonify, current_app
from flask import request, jsonify, current_app, abort

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0611: Unused current_app imported from flask (unused-import)

@@ -38,6 +40,13 @@ def unsupported_method(error):

return render_message("405 - Method not supported", "The resource you are trying to access does not support the request method used"), 405

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
E0602: Undefined variable 'render_message' (undefined-variable)


@app.errorhandler(403)
def forbidden(error):
if AUGUR_API_VERSION in str(request.url_rule):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
E0602: Undefined variable 'AUGUR_API_VERSION' (undefined-variable)

if AUGUR_API_VERSION in str(request.url_rule):
return jsonify({"status": "Forbidden"}), 403

return render_message("403 - Forbidden", "You do not have permission to view this page"), 403

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
E0602: Undefined variable 'render_message' (undefined-variable)

raise e

return render_message("500 - Internal Server Error", "An error occurred while trying to service your request. Please try again, and if the issue persists, please file a GitHub issue with the below error message:", error=stacktrace), 500
return render_message("500 - Internal Server Error", """An error occurred while trying to service your request.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
E0602: Undefined variable 'render_message' (undefined-variable)

from .init import logger
from .url_converters import *

from functools import wraps

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0611: Unused wraps imported from functools (unused-import)

@@ -318,6 +325,7 @@ def user_group_view(group = None):
return render_module("user-group-repos-table", title="Repos", repos=data, query_key=query, activePage=params["page"], pages=page_count, offset=pagination_offset, PS="user_group_view", reverse = rev, sorting = params.get("sort"), group=group)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
E0602: Undefined variable 'render_module' (undefined-variable)

backend_config = requestJson("config/get", False)
backend_config = AugurConfig(logger, db_session).load_config()

with get_session() as session:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0621: Redefining name 'session' from outer scope (line 8) (redefined-outer-name)

Comment thread collectoss/api/view/routes.py Outdated
]

backend_config = requestJson("config/get", False)
backend_config = AugurConfig(logger, db_session).load_config()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
E0602: Undefined variable 'AugurConfig' (undefined-variable)

from .server import LoginException
from collectoss.application.util import *
from collectoss.application.db.lib import get_value
from collectoss.application.config import SystemConfig

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
W0611: Unused SystemConfig imported from collectoss.application.config (unused-import)

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants