[PR #242] [MERGED] Core: ProcessHasAdminRights() function is added to utility functions. #262

Closed
opened 2026-05-05 03:44:15 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ultimatepp/ultimatepp/pull/242
Author: @ismail-yilmaz
Created: 3/17/2025
Status: Merged
Merged: 4/18/2025
Merged by: @mirek-fidler

Base: masterHead: detect_root


📝 Commits (5)

  • 72d2d22 Core: ProcessHasAdminRights() function is added to utility functions.
  • 4ad0a81 reference/DetectPrivegedProcess: Cosmetics.
  • 989525e Core: ProcessHasAdminRights() renamed as IsAdmin()
  • 4f75e49 Merge branch 'ultimatepp:master' into detect_root
  • 640164e Core: IsAdmin() renamed as IsUserAdmin().

📊 Changes

5 files changed (+54 additions, -0 deletions)

View changed files

reference/DetectPrivilegedProcess/DetectPrivilegedProcess.upp (+11 -0)
reference/DetectPrivilegedProcess/main.cpp (+12 -0)
📝 uppsrc/Core/App.cpp (+24 -0)
📝 uppsrc/Core/App.h (+2 -0)
📝 uppsrc/Core/src.tpp/AppEnv_en-us.tpp (+5 -0)

📄 Description

Sometimes it is very useful to know if the current process/app is running in administrator/root mode. In this way, developers can enable or disable certain set of features or warn the user about the security risk posed by escalated privileges.

This PR,

  • Adds ProcessHasAdminRights() function to U++, which can check if the current process is running in admin (Win) or root (POSIX) mode.
  • Adds the relevant example.
  • Adds the relevant API doc entry.

Tested on Linux, Win 10/11.

Please review.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ultimatepp/ultimatepp/pull/242 **Author:** [@ismail-yilmaz](https://github.com/ismail-yilmaz) **Created:** 3/17/2025 **Status:** ✅ Merged **Merged:** 4/18/2025 **Merged by:** [@mirek-fidler](https://github.com/mirek-fidler) **Base:** `master` ← **Head:** `detect_root` --- ### 📝 Commits (5) - [`72d2d22`](https://github.com/ultimatepp/ultimatepp/commit/72d2d22c91ca2c5d13dd57fcad2dd847dd63601d) Core: ProcessHasAdminRights() function is added to utility functions. - [`4ad0a81`](https://github.com/ultimatepp/ultimatepp/commit/4ad0a813e4e0abda774d820d6efb985d22705722) reference/DetectPrivegedProcess: Cosmetics. - [`989525e`](https://github.com/ultimatepp/ultimatepp/commit/989525e2dbbfd504417a0b8d38aa0181659c40ac) Core: ProcessHasAdminRights() renamed as IsAdmin() - [`4f75e49`](https://github.com/ultimatepp/ultimatepp/commit/4f75e491ffcebdb1eb8d95edce3b08368ef36f3f) Merge branch 'ultimatepp:master' into detect_root - [`640164e`](https://github.com/ultimatepp/ultimatepp/commit/640164eea1b5abb22ffae534d999fb9b62c98375) Core: IsAdmin() renamed as IsUserAdmin(). ### 📊 Changes **5 files changed** (+54 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `reference/DetectPrivilegedProcess/DetectPrivilegedProcess.upp` (+11 -0) ➕ `reference/DetectPrivilegedProcess/main.cpp` (+12 -0) 📝 `uppsrc/Core/App.cpp` (+24 -0) 📝 `uppsrc/Core/App.h` (+2 -0) 📝 `uppsrc/Core/src.tpp/AppEnv_en-us.tpp` (+5 -0) </details> ### 📄 Description Sometimes it is very useful to know if the current process/app is running in administrator/root mode. In this way, developers can enable or disable certain set of features or warn the user about the security risk posed by escalated privileges. This PR, - Adds `ProcessHasAdminRights()` function to U++, which can check if the current process is running in admin (Win) or root (POSIX) mode. - Adds the relevant example. - Adds the relevant API doc entry. Tested on Linux, Win 10/11. Please review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:44:15 -06:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#262
No description provided.