Added some permission checks
This commit is contained in:
parent
ae50fab159
commit
b8693af68b
@ -249,6 +249,19 @@ func (analyzer *analysisOperation) typeCheck (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// inCurrentModule returns whether or not the specified section resides within
|
||||||
|
// the current module.
|
||||||
|
func (analyzer *analysisOperation) inCurrentModule (
|
||||||
|
section Section,
|
||||||
|
) (
|
||||||
|
inCurrent bool,
|
||||||
|
){
|
||||||
|
inCurrent =
|
||||||
|
section.locator().modulePath ==
|
||||||
|
analyzer.currentPosition.modulePath
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// doIndent perfroms a fmt.Sprint operation on input, indenting the string. This
|
// doIndent perfroms a fmt.Sprint operation on input, indenting the string. This
|
||||||
// does not add a trailing newline.
|
// does not add a trailing newline.
|
||||||
func doIndent (indent int, input ...any) (output string) {
|
func doIndent (indent int, input ...any) (output string) {
|
||||||
|
|||||||
@ -169,6 +169,8 @@ func (analyzer *analysisOperation) analyzeObjectMembers (
|
|||||||
err error,
|
err error,
|
||||||
) {
|
) {
|
||||||
inheritedSection := into.what.actual
|
inheritedSection := into.what.actual
|
||||||
|
inheritsFromSameModule := analyzer.inCurrentModule(inheritedSection)
|
||||||
|
|
||||||
for index := 0; index < from.MembersLength(); index ++ {
|
for index := 0; index < from.MembersLength(); index ++ {
|
||||||
inputMember := from.Member(index)
|
inputMember := from.Member(index)
|
||||||
|
|
||||||