-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
[ComputerCraft] Add new lua functions to Bank Terminal Peripheral #96
[ComputerCraft] Add new lua functions to Bank Terminal Peripheral #96
Conversation
Added: > getAccountLabel > getSubAccountLabel
I don't think it's a good idea to return a list of any sub accounts, because someone might collect IDs and wait till they're changed to Anybody |
What function are you referring to? The |
That's exactly my point. I don't want people to be able to get a list of |
How do you intend users to get uuids of accounts that the owner wants them to access? Would it be preferable to put the uuids in the accounts/sub-accounts tab? There is always a chance that malicious users read the uuid out of a already programmed computer thus rendering any security steps useless. If you wish to contact me further about any issues with this PR I am |
Users are intended to get the UUIDs by using a computer to read them from an authorized card. Of course, malicious users could read the uuid from an unsecured computer, but, as long as the relevant server has some sort of claims mod, computers could be kept secure. Other than enumerating sub accounts, I'm for merging this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nitpicks, but very good!
...reatenumismatics/compat/computercraft/implementation/peripherals/BankTerminalPeripheral.java
Show resolved
Hide resolved
...reatenumismatics/compat/computercraft/implementation/peripherals/BankTerminalPeripheral.java
Outdated
Show resolved
Hide resolved
common/src/main/java/dev/ithundxr/createnumismatics/config/CServer.java
Outdated
Show resolved
Hide resolved
Documentation for new function.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Adds four new lua functions to the Bank Terminal peripheral.
getAccounts()
getAccountLabel(String accountID)
getSubAccounts(String accountID)
getSubAccountLabel(String accountID, String authorizationID)
getAccounts()
Gets a list of UUIDs for all accounts.
Returns
list
of UUIDs for all accounts.getAccountLabel(String accountID)
Get the label of the specified account.
Throws an error if the account is not found.
Returns
string
the name of the specified account.getSubAccounts(String accountID)
Gives a list of UUIDs for any sub-accounts inside of specified account.
Only displays sub-accounts with authorisation type set to
Anybody
.Returns
list
of UUIDs for sub-accountsgetSubAccountLabel(String accountID, String authorizationID)
Returns the name for the specified sub-account inside of the specified account.
Authorisation type must be set to
Anybody
otherwise will throw an error.Returns
string
the name of the specified sub-account.