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

[BUG] Permission check wrong #197

Closed
balugaq opened this issue Jul 19, 2024 · 7 comments · Fixed by #198
Closed

[BUG] Permission check wrong #197

balugaq opened this issue Jul 19, 2024 · 7 comments · Fixed by #198

Comments

@balugaq
Copy link

balugaq commented Jul 19, 2024

When I disable Network Cell in Items.yml and then restart the server, I see that I cannot open the Network Wireless Receiver and Network Wireless Transmitter.
Then I found these wrong permission check in the source:

In NetworkVacuum.java:
It used Network Grid's permission check.
a7142af142c0ffb3dad7d53618e94a30
In NetworkWirelessReceiver.java:
It used Network Cell's permission check.
ccbcf63001e3643d72905e85d19ef790
In NetworkWirelessTransmitter.java:
It used Network Cell's permission check, too.
8fe91cbd9937ba317f023d00ae107fcb
In NetworkPurger.java:
It used Network Grid's permission check.
95fe344272a24494cd99c0bd24fc7fb7
In NetworkGreedyBlock.java:
It used Network Cell's permission check.
8a77b29c9632f649a660331de743c474

@Sefiraat
Copy link
Owner

Also resolved via #195

@Sefiraat
Copy link
Owner

Feel free to PR when you find issues like this direct within the code - you're very welcome to do as you wish :D

@balugaq
Copy link
Author

balugaq commented Jul 19, 2024

I'm sorry, but it's just like what I said in #188:

Here is a proposed solution to fix issues #188 and #192:

Convert all slots in the Cell to output slots.
Also, convert the receive slot in GreedyBlock to an output slot.
In the registerNode function of NetworkRoot, check the transportable slots of the incoming location for both Cell and GreedyBlock.
If the check passes, it indicates that the block is available. Otherwise, do not add it to the cells or greedyblocks lists.
I would like to submit a pull request for this fix, but I currently have other ongoing work in the project’s branch.

@balugaq
Copy link
Author

balugaq commented Jul 19, 2024

There may be a way to solve this, but I am not familiar with the usage of GitHub

@balugaq
Copy link
Author

balugaq commented Jul 19, 2024

In addition, thank you for your repair!

@Sefiraat
Copy link
Owner

No, thank you for the report! :D

@balugaq
Copy link
Author

balugaq commented Jul 19, 2024

Thank you for the fix! It’s great to see our joint efforts paying off. I’m glad I could help by reporting, and you could help by repairing. Together, we’re making a difference for this project. :D

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 a pull request may close this issue.

2 participants